How to configure access to web server running on openvpn tunnel

  • Hello,

    I have another scenario I am unable to configure using pfsense. Hope you can help me solving this.

    Here is the setup.

    A. PFSense firewall with 2 interfaces: WAN (static public IP) and LAN private net (
    B. Separate LAN network hooked up to the internet via ADSL line with dynamic IP. In this LAN there is a freebsd machine with Web server running on it. The freebsd machine establishes OpenVPN tunnel to the Pfsense (A). Once VPN connection is established B has up and running tun0 interface (, can ping PFsense on tun0 address space. Also web server is available on port 80 of the tun0 network.

    The above is working fine. Also I can reach Web sever ( from A-LAN (

    Now the problem.
    I have to access web service located on the B machine from the outside world, not A-LAN, but WAN. I don't want to use any kind of dynamic DNS.
    I think that it should be possible to redirect port 80 of WAN interface belonging to (A) to the IP address of the freebsd machine from (B) network. Redirect should be done on tun0 interface. So there should be redirect of WAN:80 ->

    Although I tried to set it up in many ways I didn't succeed.

    Could you advice how this should be done.

    Thank you in advance.


Log in to reply