Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Sshuttle A VPN-based transparent proxy that uses ssh     - Red Hat Enterprise Linux 6.4 Configuring VNC Remote Desktop login access (Linux)

- How to understand the difference between synchronous and asynchronous non-blocking blocking (Programming)

- Android Qemu GPS module (Programming)

- Linux platform Oracle MySQL connection (Database)

- Visual Studio Code experience (Linux)

- Linux static library generated Guide (Programming)

- Linux environment SSH login password instead of using the RSA Certificate (Linux)

- How do I upgrade from Ubuntu 15.04 to Ubuntu 15.10 (Linux)

- pureftpd basis: Install, configure, implement, anonymous logon (Linux)

- Implement Oracle dynamic registration of non-standard port 1521 (Database)

- Ubuntu comes with gedit editor to add Markdown preview widget (Linux)

- RHEL 7.1 compile and install Ganglia 3.7.1 (Server)

- Ubuntu 12.04 64bit Install Source Insight 3.5 and create desktop icons (Linux)

- Linux installation beautify early experience (Linux)

- Sqoop data export import command (Database)

- MySQL time field based partitioning scheme summary (Database)

- How to find the available network adapter on Ubuntu (Linux)

- Linux Change ssh port and disable remote root login at (Linux)

- Java memory area Explanation (Programming)

- CentOS 6.4 Telecom ADSL dial-up network configuration (Linux)

  Sshuttle A VPN-based transparent proxy that uses ssh
  Add Date : 2017-08-31      
  Sshuttle allows you to create a VPN connection from your computer to any remote server via ssh, as long as your server supports python2.3 or later. You must have local root privileges, but you can have a regular account on the server side.

You can run multiple sshutles on one machine at the same time to connect to different servers, so you can use multiple VPNs at the same time, and sshuttle can forward all traffic from your subnet to the VPN.

Install sshuttle in Ubuntu

Enter the following command in the terminal

Sudo apt-get install sshuttle

Use sshuttle

Sshuttle syntax

Sshuttle [options ...] [- r [username @] sshserver [: port]] [subnets]

Option Details

-r, -remote = [username @] sshserver [: port]

The remote host name and optional user name, used to connect to the remote server ssh port number. Such as example.com, testuser @ example.com, testuser @ example.com: 2222 or example.com:2244.

Sshuttle example

In the machine using the following command:

Sudo sshuttle -r username @ sshserver
When started, sshuttle creates an ssh session to the server specified by -r. If -r is lost, it runs the client and server locally, which is sometimes useful in tests.

After connecting to the remote server, sshuttle will upload its (python) source code to the remote server and execute. Therefore, you do not need to install sshuttle on the remote server, and there is no sshuttle version conflict between the client and the server.

More examples in the manual

Proxy All local connections for local testing, not using ssh:

$ Sudo sshuttle -v 0/0
Starting sshuttle proxy.
Listening on ( '', 12300).
[Local sudo] Password:
Firewall manager ready.
C: connecting to server ...
S: available routes:
C: connected.
Firewall manager: starting transproxy.
C: Accept: '': 50035 -> '': 139.
C: Accept: '': 47523 -> '77 .141.99.22 ': 443.
... etc ...
^ C
Firewall manager: undoing changes.
C: Keyboard interrupt: exiting.
C: SW # 8: 47523: deleting
C: SW # 6: 50035: deleting
Test connections to remote servers, automatically guessing hostnames and subnets:

$ Sudo sshuttle -vNHr example.org
Starting sshuttle proxy.
Listening on ( '', 12300).
Firewall manager ready.
C: connecting to server ...
S: available routes:
C: connected.
C: seed_hosts: []
Firewall manager: starting transproxy.
Hostwatch: Found: testbox1:
Hostwatch: Found: mytest2:
Hostwatch: Found: domaincontroller:
C: Accept: '': 60554 -> '77 .141.99.22 ': 22.
^ C
Firewall manager: undoing changes.
C: Keyboard interrupt: exiting.
C: SW # 6: 60554: deleting
- Ubuntu 15.04 / 14.04 install Ubuntu After Install 2.6 (Linux)
- Python Basics Tutorial - lambda keyword (Programming)
- Ubuntu Tutorial: How to Upgrade a New Linux Kernel 3.12.7 on Ubuntu (Linux)
- Elaborate .NET Multithreading: Thread Pool (Programming)
- Modifying the system registry protection server security (Linux)
- Ubuntu 14.10 used ifconfig commands to manage your network configuration (Linux)
- RabbitMQ tutorial examples: the Hello RabbitMQ World Java realization (Linux)
- PostgreSQL vacuum principle of a function and parameters (Database)
- Ubuntu arm-none-eabi-gcc compiler treated with STM32F10x (Linux)
- Share and show your code on GitHub (Linux)
- Compile and install GCC 4.8.1 + GDB 7.6.1 + Eclipse in CentOS 6.4 in (Linux)
- Analysis examples: Intrusion Response Linux platform Case (Linux)
- Approach the next Linux shared interrupts (Linux)
- Linux Mint 17 set up the Ruby environment (Linux)
- Use LKM change the default linux security level (Linux)
- How to add and delete bookmarks in Ubuntu (Linux)
- Ubuntu Gitolite management Git Server code base permissions (Server)
- Ubuntu uses conky add desktop control (Linux)
- How to fix the Ubuntu Error script returned error exit status 1 (Linux)
- The method to mount the CD under Linux (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.