All Projects → AnalogJ → Drawbridge

AnalogJ / Drawbridge

Licence: mit
manage SSH access to multiple applications/environments protected by bastion servers

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Drawbridge

Fq Book
📖《这本书能让你连接互联网》详细阐述代理、隧道、VPN运作过程,并对GFW策略如:地址端口封锁、服务器缓存投毒、数字验证攻击、SSL连接阻断做相关的原理说明
Stars: ✭ 2,393 (+1120.92%)
Mutual labels:  tunnel, ssh
Docker Tunnel
a (simple) dockerized ssh tunnel
Stars: ✭ 96 (-51.02%)
Mutual labels:  tunnel, ssh
Stowaway
👻Stowaway -- Multi-hop Proxy Tool for pentesters
Stars: ✭ 500 (+155.1%)
Mutual labels:  tunnel, ssh
Nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Stars: ✭ 19,537 (+9867.86%)
Mutual labels:  tunnel, ssh
Ssh2 Promise
ssh with promise/async await and typescript support
Stars: ✭ 110 (-43.88%)
Mutual labels:  tunnel, ssh
Openiothub
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Stars: ✭ 371 (+89.29%)
Mutual labels:  tunnel, ssh
Sshtunnel
SSH tunnels to remote server.
Stars: ✭ 797 (+306.63%)
Mutual labels:  tunnel, ssh
remotemoe
tunnels to localhost and other ssh plumbing
Stars: ✭ 112 (-42.86%)
Mutual labels:  tunnel, ssh
Inlets Pro
Secure TCP and HTTP tunnels that work anywhere
Stars: ✭ 179 (-8.67%)
Mutual labels:  tunnel, ssh
Mole
CLI application to create ssh tunnels focused on resiliency and user experience.
Stars: ✭ 1,520 (+675.51%)
Mutual labels:  tunnel, ssh
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 8,395 (+4183.16%)
Mutual labels:  tunnel, ssh
Corkscrew
Corkscrew is a tool for tunneling SSH through HTTP proxies.
Stars: ✭ 149 (-23.98%)
Mutual labels:  tunnel, ssh
client
Remote access and tunnels to your localhost from everywhere in the world.
Stars: ✭ 25 (-87.24%)
Mutual labels:  tunnel, ssh
Exodus
network proxy and tunnel (VPN)
Stars: ✭ 432 (+120.41%)
Mutual labels:  tunnel, ssh
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 154 (-21.43%)
Mutual labels:  tunnel, ssh
Python Proxy
HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
Stars: ✭ 692 (+253.06%)
Mutual labels:  tunnel, ssh
Teleconsole
Command line tool to share your UNIX terminal and forward local TCP ports to people you trust.
Stars: ✭ 2,750 (+1303.06%)
Mutual labels:  tunnel, ssh
FastTunnel
expose a local server to the internet. 高性能跨平台的内网穿透解决方案 远程内网计算机 域名访问内网站点 反向代理内网服务 端口转发 http代理
Stars: ✭ 815 (+315.82%)
Mutual labels:  tunnel, ssh
Sidedoor
SSH connection daemon for Debian/Raspbian/Ubuntu/etc
Stars: ✭ 97 (-50.51%)
Mutual labels:  tunnel, ssh
Sish
HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
Stars: ✭ 2,087 (+964.8%)
Mutual labels:  tunnel, ssh

drawbridge_view

Drawbridge

Circle CI Coverage Status GitHub license Godoc Go Report Card GitHub release Github All Releases

Bastion/Jumphost tunneling made easy

Introduction

A Jump/Bastion host is a special purpose computer on a network specifically designed and configured to withstand attacks. The computer generally hosts a single application, for example a proxy server, and all other services are removed or limited to reduce the threat to the computer. It is hardened in this manner primarily due to its location and purpose, which is either on the outside of a firewall or in a demilitarized zone (DMZ) and usually involves access from untrusted networks or computers.

In secure cloud architectures, jump/bastion hosts are the primary method to access the internal/protected network. This means that all traffic can be audited, and that a single server can be shut down in the event that the network is compromised.

However as this architecture is scaled up and deployed across multiple environments (testing, staging, production), it can be complicated to maintain a single ~/.ssh/config file that allows you to tunnel into your various jump host protected internal networks.

Drawbridge aims to solve this problem in a flexible and scalable way.

Features

  • Single binary (available for macOS and linux), only depends on ssh, ssh-agent and scp
  • Uses customizable templates to ensure that Drawbridge can be used by any organization, in any configuraton
  • Helps organize your SSH config files and PEM files
  • Generates SSH Config files for your servers spread across multiple environments and stacks.
    • multiple ssh users/keypairs
    • multiple environments
    • multiple stacks per environment
    • etc..
  • Can be used to SSH directly into an internal node, routing though bastion, leveraging SSH-Agent
  • Able to download files from internal hosts (through the jump/bastion host) using SCP syntax
  • Supports HTTP proxy to access internal stack urls.
  • Lists all managed config files in a heirarchy that makes sense to your organization
  • Custom templated files can be automatically generated when a new SSH config is created.
    • eg. Chef knife.rb configs, Pac/Proxy files, etc.
  • Cleanup utility is built-in
  • drawbridge update lets you update the binary inplace.
  • Pretty colors. The CLI is all colorized to make it easy to skim for errors/warnings

Getting Started

  1. Download the latest release binary from the Releases page for your OS. (Mac, Windows & Linux available)
  2. Rename the downloaded binary to drawbridge
  3. Run chmod +x drawbridge
  4. Move the renamed binary into your path, eg. /usr/bin/local
  5. Run drawbridge help from a terminal to confirm it was installed correctly
  6. Add a configuration file to ~/drawbridge.yaml. See Configuration section.

Usage

$ drawbridge help
 ____  ____    __    _    _  ____  ____  ____  ____    ___  ____
(  _ \(  _ \  /__\  ( \/\/ )(  _ \(  _ \(_  _)(  _ \  / __)( ___)
 )(_) ))   / /(__)\  )    (  ) _ < )   / _)(_  )(_) )( (_-. )__)
(____/(_)\_)(__)(__)(__/\__)(____/(_)\_)(____)(____/  \___/(____)
github.com/AnalogJ/drawbridge                 darwin.amd64-1.0.10

NAME:
   drawbridge - Bastion/Jumphost tunneling made easy

USAGE:
   drawbridge [global options] command [command options] [arguments...]

VERSION:
   1.0.10

AUTHOR:
   Jason Kulatunga <[email protected]>

COMMANDS:
     create         Create a drawbridge managed ssh config & associated files
     list           List all drawbridge managed ssh configs
     connect        Connect to a drawbridge managed ssh config
     download, scp  Download a file from an internal server using drawbridge managed ssh config, syntax is similar to scp command.
     delete         Delete drawbridge managed ssh config(s)
     proxy          Build/Rebuild a Proxy auto-config (PAC) file to access websites through Drawbridge tunnels
     update         Update drawbridge to the latest version
     help, h        Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

Actions

Create

Using the questions & config_template defined in the configuration file (~/drawbridge.yaml) Drawbridge will attempt to generate a managed ssh config file. Drawbrige will prompt the user for any questions which it is unable to determine an answer (no default value and no flag value specified).

Questions & Templates can be customized completely to match your organization.

$ drawbridge create --environment prod --shard us-west-2

Current Answers:
environment: prod
shard: us-west-2
stack_name: app
Please enter a value for `shard_type` [string] - Is this a live (green) or idle (blue) stack?:
idle
Please enter a value for `username` [string] - What username do you use to login to this stack?:
aws
WARNING: PEM file missing. Place it at the following location before attempting to connect. /Users/jason/.ssh/drawbridge/pem/prod/aws-prod.pem
Writing template to /Users/jason/.ssh/drawbridge/prod-app-idle-us-west-2

You can also enable DRYRUN mode to see exactly what files Drawbrige would generate, without actually writing any files.

$ drawbridge create --environment prod --dryrun
...
2018/04/22 23:56:23 Writing template to /Users/jason/.ssh/drawbridge/prod-app-idle-us-west-1
[DRYRUN] Would have written content to /Users/jason/.ssh/drawbridge/prod-app-idle-us-west-1:

# This file was automatically generated by Drawbridge
# Do not modify.
#
...

Connect

$ drawbridge connect
Rendered Drawbridge Configs:
├── [prod]  environment
│   └── [app]  stack_name
│       ├── [us-east-1]  shard
│       │   ├── [1]  shard_type: idle, username: aws
│       │   └── [2]  shard_type: live, username: aws
│       └── [us-east-2]  shard
│           ├── [3]  shard_type: idle, username: aws
│           └── [4]  shard_type: live, username: aws
├── [stage]  environment
│   └── [app]  stack_name
│       └── [us-east-2]  shard
│           ├── [5]  shard_type: idle, username: aws
│           └── [6]  shard_type: live, username: aws
└── [test]  environment
    └── [app]  stack_name
        ├── [us-east-1]  shard
        │   ├── [7]  shard_type: idle, username: aws
        │   └── [8]  shard_type: live, username: aws
        └── [us-east-2]  shard
            ├── [9]  shard_type: idle, username: aws
            └── [10]  shard_type: live, username: aws

Enter number of drawbridge config you would like to connect to (1-10):

drawbridge connect will connect you to the bastion/jump host using a specified Drawbridge config file. It'll also add the associated PEM key to your ssh-agent.

If you want to connect directly to a internal server, you can do so by selecting a config id and specifying the hostname/short name

drawbridge connect 1 database-1

Delete

$ drawbridge delete
...
        └── [us-east-2]  shard
            ├── [9]  shard_type: idle, username: aws
            └── [10]  shard_type: live, username: aws

Enter number of drawbridge config you would like to delete:
10
Are you sure you would like to delete this config and associated templates? (PEM files will not be deleted)

environment: test
shard: us-east-2
shard_type: live
stack_name: app
username: aws

Please confirm [true/false]:
true
Deleting config file: /Users/jason/.ssh/drawbridge/test-app-live-us-east-2
Deleting answers file
Finished

You can use the --force flag to disable the confirm prompt. The --all flag can be used to delete all Drawbridge managed configs in one command.

You can use the following command to completely wipe out all Drawbridge files and start over.

drawbridge delete --all --force

Update

$ drawbridge update

Update drawbridge to the latest version
Current: v1.0.9 [2018-04-26]. Available: v1.0.10 [2018-04-27]
Release notes are available here: https://github.com/AnalogJ/drawbridge/releases/tag/v1.0.10
Are you sure you would like to update drawbridge to v1.0.10?
Please confirm [yes/no]:

Download

$ drawbridge scp 1 database-1:/tmp/test-file.txt ~/test-file.text

Download a file from an internal server using drawbridge managed ssh config, syntax is similar to scp command. 
Adding PEM key to ssh-agent
Begin downloading file through bastion
test-file.text                                                      100% 4099     4.4KB/s   00:00    

Downloading files through the bastion is simple and easy.

Proxy

$ drawbridge proxy
Build/Rebuild a Proxy auto-config (PAC) file to access websites through Drawbridge tunnels
Pac file already exists, updating.
2018/04/27 15:31:55 Writing template to ~/drawbridge.pac

PAC files, when used with a compatible browser, allow you to access internal dashboards and websites as you would any publicly accessible site.

As you create Drawbride configurations, just run drawbridge proxy to update the PAC file, written to ~/drawbridge.pac by default.

Configuration

We support a global YAML configuration file that must be located at ~/drawbridge.yaml

Check the example.drawbridge.yml file for a fully commented version.

Testing Circle CI

Drawbridge provides an extensive test-suite based on go test. You can run all the integration & unit tests with go test $(go list ./... | grep -v /vendor/)

CircleCI is used for continuous integration testing: https://circleci.com/gh/AnalogJ/drawbridge

Contributing

If you'd like to help improve Drawbridge, clone the project with Git and install dependencies by running:

$ git clone git://github.com/AnalogJ/drawbridge
$ glide install

Work your magic and then submit a pull request. We love pull requests!

If you find the documentation lacking, help us out and update this README.md. If you don't have the time to work on Drawbridge, but found something we should know about, please submit an issue.

To-Do List

We're actively looking for pull requests in the following areas:

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Jason Kulatunga - Initial Development - @AnalogJ

License

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].