as
I will have a remote OpenVPN server behind a firewall. The client connection will be the local machine. I would like to be able to bring up a VPN tunnel without having to deal with port-forwading, etc on the remote external firewall. Basically the server should tunnel out of the firewall (somehow) and allow clients to connect through it.
Does that make sense? I know this is possible with SSH, so I'm wondering if something similar can be done with OpenVPN?
Technically it's almost switching around the client/server roles, in terms of connectivity (The machine inside the remote firewall would be a client that connects to my local server). But I still want the traffic at the local side to be redirected (redirect-gateway) through the remote endpoint.
Any tips?
janjust
you want to achieve two things:
1) establish a VPN tunnel
2) establish some form of routing over this tunnel
split the two : first get the tunnel up and running, then think about routing. How will the VPN machine behind the firewall connect to the client? how does it know what IP to connect to?
as
Thanks for the response.
Well let's just assume that the client IP is static. How would I go about bringing up the tunnel?
janjust
if the "client" has a static public IP then make that machine the VPN server and connect the other end to it. This is a "normal" setup.
Once the VPN connection is established set up the right routing rules to direct traffic to what you call the "server" (but which I'd call the VPN client).
as
Ok that makes sense.
It was nice being able to use the 'redirect-gateway' directive before to automatically generate the correct routes. But in this set-up I'll essentially need to manually specify the 'reverse' of these routes myself, correct?
janjust
correct - the server can push routes to the client, not vice versa; so you will need to configure your server to direct all traffic to/via the client.