Connecting to FTP via VPN

user1319580 picture user1319580 · Apr 10, 2012 · Viewed 47.4k times · Source

A client has a web server that can only be accessed when on their network.

For example sake, let's say my login details are:

Server: example.com User: user password: password

for when I am on their company's internet. I use either Cyberduck or FileZilla to connect to their web server.

I'd much rather be able to connect remotely but I just have a lot of trouble setting this up. I have connected to the client's vpn, let's say vpn.example.com, and use Cisco AnyConnect to accomplish this.

Beyond this, my knowledge of VPN is limited. In an FTP client, is there anything I should be doing to ensure that it uses the VPN to connect to example.com rather than my home connection?

Thanks.

-m

Answer

George picture George · Apr 10, 2012

There two ways around this. I am assuming you are using Windows or a Mac since the AnyConnect client doesn't come in a Linux flavor.

Open a CMD/Terminal and type "route print" or "netstat -r" take note of where example.com is pointing to. Most likely the default route will catch it. In that case you want to add a route to have it go via the VPN interface for any traffic that goes to example.com (After doing this, once you disconnect from the VPN you will not be able to connect to example.com any more unless you connect to the VPN.)

The other way is to connect to the FTP using the local IP of the FTP once connected to the VPN.