PF Port Forward through OpenVPN Tunnel to host behind OpenVPN Client

Hi Everyone,

I know I'm new here, hopefully someone can help. I don't know how to configure pf for the following scenario. We use PFsense for our routers, so I'm a little famillar with pf and its syntax, but I'm not sure how to configure pf in freeBSD 10.3 to accomplish this.

The openVPN setup is all done, and with PF disabled, all devices can access all devices on the subnets, so I know that setup is good and working. (ie. Device01 on can ping the gateway, and device02 on, and vice versa)

I'm setting up a gateway server to provide access to services running on devices that reside on remote NAT'd subnets.

So in short, what I need to do is:

Internet -> Gateway -> Port Forward to Remote Device via VPN tunnel

If we take the attached image for example:

I need to forward port 1001 on gateway public interface (, to remote device01 port 80 with IP

I feel like I need to forward port 1001 on the gateway to client router at, and then forward on client router vpn interface to device01... But I can't quite get it working :(

Any help would be great!

Thanks, Carl


  • vpn_tun.png
    61.8 KB · Views: 660
Just set up the port forward to the correct IP address. Let the system figure out how to route it there. It'll route through the VPN if that's where it needs to go.