NAT Translation issues with OpenVPN on a private network



  • 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…


  • Netgate

    https://doc.pfsense.org/index.php/Why_can't_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.



  • That did it, holy crap.

    Thank you so much.


 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy