Routing all Lan traffic over OpenVPN client
I have set up an openVPN client on a fresh pfsense installation. The openVPN client is up and running and I can successfully ping internet based ip addresses by selecting OPENVPN client as the source.
I have created a virtual interface mapped to the openVPN client. I can successfully ping internet facing ip addresses using OPT1 (the virtual interface).
I have the checkbox for BOTH enabled on the openVPN client to create the gateways required. I have set the monitoring IP on the gateway as an internet IP address (220.127.116.11) and the gateway is reporting its up, so must have internet access.
I have set both the IPv4 version and IPv6 version of these gateways as the default and checked my catchall LAN firewall rule is set to use this gateway.
For some reason...I have no internet access on a networked computer that is configured to use the pfsense as its default gateway. I cannot ping any internet IP addresses.
If I set up a constant ping to 18.104.22.168 ,When running a packet capture on the LAN I can see the traffic. When I run a packet capture on the OPENVPN interface I can also see the traffic so im not sure where it is all failing.
Can anybody think of something I may have missed?
So did you create your outbound nat for your traffic flowing through the vpn connection?
Pfsense can talk through the vpn because it has an IP given to it by the vpn server it connected to as a client. but your lan devices IP need to be natted to this connections IP..
This is normally done by switching to hybrid mode on your outbound nat and creating the nat.
Ah ok thanks I had a feeling it would be outbound NAT but having not played with this much I was a little lost. It was in Automatic mode and I tried setting up a rule but it said this rule is being ignored.
IL try fiddling with the outbound NAT tomorrow
example here I only every policy route out my box on my lan which is on 192.168.9/24 for testing stuff.. And if I ever need to do some other vlan on my network, its simple enough to just add it to the outbound nat.
Yep looks like I've done EVERYTHING except switch from automatic to hybrid mode hence why my rule "is being ignored". Doh!
IL give it a try in the morning thanks for the help
Rico last edited by
Jim Pingle did a very great Hangout for OpenVPN as a WAN, you can check it out on Youtube: https://www.youtube.com/embed/lp3mtR4j3Lw