Set one IP to use OpenVPN gateway
-
Hey,
I've been using Pfsense for a few years and am fairly familiar with it, but I don't do anything super advanced with it so I'm a little lost. Today I connected an OpenVPN client and after a bit of troubleshooting I have that working. It's getting an IP address, etc, it all seems good. Where I'm struggling now is setting one of my Ubuntu 12.04 headless servers to only use that gateway for it's outgoing internet access.
Is there a way I can configure it to route all outgoing traffic from that IP address through the VPN? I also have a little bit of incoming traffic that needs to run over the normal network but otherwise everything else is internal.
Thanks!
-
Interfaces > (assign), assign the VPN and then enable it with an IP type of "none", then go back and edit/save the VPN to make sure it's started back up OK.
After that you should see a gateway for the VPN in System > Routing, and you can use that gateway in firewall rules to make traffic exit that path.
Depending on the other side you might also need to setup manual outbound NAT rules to do NAT as the traffic leaves the VPN