Fwd: Fwd: NAT for use with OpenVPN

Morgan Wesström freebsd-database at pp.dyndns.biz
Tue Nov 12 09:35:51 UTC 2019


> Wireless LAN adapter Wi-Fi:
> 
>     IPv4 Address. . . . . . . . . . . : 192.168.1.5(Preferred)

I think I've spotted the problem. You're laptop is hooked up to your 
local LAN. The NAT in your router can not normally "wrap around" packets 
destined to its WAN side and then apply NAT to them, which will be the 
case when you try to establish the VPN tunnel from within your LAN. This 
is a classic NAT problem and it has hit many, many people in the past 
trying to run servers of various kinds on their home LAN and then trying 
to access them as if they were somewhere on the outside of the router. 
The result will be... well, unpredictable. :) You need to connect your 
laptop through its own Internet connection so it has a valid public IP 
address.

Other than that, everything else looks fine including the routing table.

A small clarification about default gateways. You only have one per 
machine normally - not one per interface. Your computer knows what 
subnets and machines are connected to every interface in your computer 
and will send packets there when appropriate. It's only when it doesn't 
know where the destination is it will send it to the default gateway. So 
one default gateway per machine is the norm.

/Morgan


More information about the freebsd-pf mailing list