GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.17k stars 436 forks source link

Add the option to work with a Socks Proxy #2696

Open 1001QAdotNET opened 5 years ago

1001QAdotNET commented 5 years ago

Hi guys

I am not sure if this is possible, I can't find a way to do it properly. Here is my use case scenario: -I use securecrt as socks proxy to get to two different environments (in other words I have to ssh tunnels active, port 1080 and port 1081) Since GNS3 does not seem to have a way to work with socks proxy I configured a static translation between 127.0.0.1:3080 and the remote host used for GNS3. So that worked. Now the issue is that when I try to doubleclick on a device in my project the GUI client is trying to telnet to 127.0.0.1:deviceport which obviously fails and needs to be configured statically which is tedious for each project/device

The ask here is to allow GNS3 GUI to be configured to use socks proxy. Please add it to your new feature list or please point me to the guide that shows how to do this if it is already possible. I read the VPN instructions but I am already on VPN :-) when in this scenario using internal bastion hosts to access these environments

The issue was raised here GNS3/gns3-gui#750 but expedited too quickly :-)

grossmj commented 5 years ago

We should be able to support both Socks and HTTP proxies using https://doc.qt.io/qt-5/qnetworkproxy.html

1001QAdotNET commented 5 years ago

if the WEB GUI becomes the preferred interface then this issue could be closed or ignored

drBunsen commented 4 years ago

Hi, I faced the same problem and the following solution worked for me:

  1. I established SSH session from client PC to the VM server. This session can be done via proxy or static tunnel. In my case I used SOCKS5 proxy. This SSH session should be established all the time the GNS3 application is used. Otherwise it will lose connection to the VM server.

  2. In this session I added following tunnels: 4L3080 x.x.x.x:3080 - for communication between GNS3 app and VM server (1001QAdotNET has this step already done) 4L3079 D - this is dynamic tunnel for console access 4R9090 127.0.0.1:9090 - for VM server upgrades - not directly related to the subject problem where x.x.x.x is my server's IP address on eth0.

  3. On the server, in Configure menu I changed IP bindings to: host = x.x.x.x

  4. After server restart the consoles are no longer available on 127.0.0.1, but on x.x.x.x instead.

  5. Now you can access devices in your project via your localhost SOCKS5 proxy at port 3079 I'm using KiTTY, which doesn't have the option to set proxy from the command line, so I had to create and save the session "Lab-devices" first with Proxy hostname 127.0.0.1 and port 3079 In GNS3 the command for Console application is like this: kitty_portable.exe -telnet -load "Lab-devices" %h -P %p -loghost "%d"

I don't have a solution for VNC access. Anyway, it would be great to have the native proxy support in the application.

I'm using GNS 2.2.7