Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NAT Translation issues with OpenVPN on a private network

    Scheduled Pinned Locked Moved NAT
    3 Posts 2 Posters 489 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pkris
      last edited by

      Hey all,

      I’ve got a pfSense box that’s acting as a firewall and an OpenVPN server in my rack at a datacenter.

      I’ve set Redirect all traffic through gateway, I can access the World Wide Web when connected to VPN.

      Essentially, when connected to VPN my virtual IP is on the LAN subnet (10.8.200.XX), but because it's doing the translation to the Internet for the public IPs of each VM, I can only access internal web servers via their LAN (and not public) IP when connected to VPN. Is double NAT the best option, is there a way to re-write these IPs for VPN connected clients?

      Example: Public IP of 10.10.10.10 redirects to LAN IP 10.8.200.1 on my pfSense, I do this so I can say, forward only port 80 to 10.8.200.1.

      When connected to VPN I get a virtual IP of 10.8.255.3, which can talk to 10.8.200.1, but NOT 10.10.10.10 (the public IP of the webserver locate at 10.8.200.1) this means I can't visit my ticketing system when over VPN, etc… therefore I can't lock it down via public IP address.

      If I edit the /etc/hosts file on my computer, sure I can add

      10.8.200.1 myticketingsystem.com
      

      But, that's not really a solution, and can't be deployed to all my employees quickly…

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        https://doc.pfsense.org/index.php/Why_can%27t_I_access_forwarded_ports_on_my_WAN_IP_from_my_LAN/OPTx_networks

        I do not know if NAT reflection will work from an OpenVPN client.

        If it does not initially work, assign an interface and maybe move the pass rules to the assigned interface and remove them from the OpenVPN tab.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • P
          pkris
          last edited by

          That did it, holy crap.

          Thank you so much.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.