Nat – pfSense NAT to VPN address

nat;pfsenserouting

I'm trying to setup NAT to an Address reachable through OpenVPN.

Site A is the VPN server and has Public IP 1.1.1.1, network 192.168.5.0/24 and Site B is VPN Client and public IP 2.2.2.2, network 192.168.10.0/24.

Goal is to have NAT Rule at Site A to 192.168.10.33 in site B.

Everything in the VPN enviroment works. Both Sites can communicate with each other and I've already done the Outbound NAT on site B related with that IP so the 192.168.10.33 reachs the Internet through Site B.

On Site A I've created a simple rule, NAT port 80 from WAN Address to 192.168.10.33.

I've tried creating outbound NAT on Site B also but I guess it was not correct.

What am I missing?

Best Answer

You will need outbound NAT on site A

If you look at the automatic rules on outbound, the Source addresses won't include 192.168.10.0

Switch to hybrid mode.

Add a mapping Source network 192.168.10.0

You will also need routing on server 192.168.10.33, so reply to internet traffic goes via Site A.

I'm not sure how it would be possible to have server 33 or Site B gateway reply to internet connects through gw B and gw A at the same time. Perhaps NAT the openvpn again on node B, rather than the default routing, so it maintains connection state, and replies to correct place.

Related Topic