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

    [Solved] OpenVPN NAT Outbound

    Scheduled Pinned Locked Moved OpenVPN
    15 Posts 2 Posters 6.7k 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.
    • F
      fab1330
      last edited by

      @phil.davis:

      Here's what I tried as Outbound NAT in pfSense B :
      without success :-(

      The picture was also without success  ;) - try posting again.
      You should be able to also put manual NAT on pfSenseB LAN for the OpenVPN subnet.
      Personally I would have a dedicated client-server pair for the site-to-site link, then make a road-warrior server also. That allows you to reconfigure/restart one server without interrupting the other. I can't immediately think of other reasons why.
      In any case, the NAT out onto pfSenseB LAN should do the trick for both.

      Oops, here's what I tried.
      But without success

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        Your picture is now successful in both places.
        Destination should be "*" - you want general traffic heading to the internet in general to get NAT applied on the way out of pfSenseB towards routerB.
        And that should be on the interface on pfSenseB that heads towards routerB.
        I expect you also want a similar NAT rule for source 10.30.0.0/24 (traffic from pfSenseA LAN)

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • F
          fab1330
          last edited by

          @phil.davis:

          Destination should be "*" - you want general traffic heading to the internet in general to get NAT applied on the way out of pfSenseB towards routerB.
          And that should be on the interface on pfSenseB that heads towards routerB.
          I expect you also want a similar NAT rule for source 10.30.0.0/24 (traffic from pfSenseA LAN)

          Like this?

          It doesn't work;-(

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            Why does the interface column say VPN_UDP?
            I am expecting it to be the interface for pfSenseB eth0 (maybe called LAN or LAN1 or something), which is where the packets are exiting and need to have NAT applied.
            Then the NAT address can be LANaddress or similar, rather than entering an actual IP address.

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • F
              fab1330
              last edited by

              @phil.davis:

              Why does the interface column say VPN_UDP?
              I am expecting it to be the interface for pfSenseB eth0 (maybe called LAN or LAN1 or something), which is where the packets are exiting and need to have NAT applied.
              Then the NAT address can be LANaddress or similar, rather than entering an actual IP address.

              I also tried doing a NAT on output inteface. example eth0 on pfSense B, but it does not work.

              And if I do a ping from 10.100.0.5 to 192.168.10.150, and I make a packet capture sur eth0 (BUREAUTIQUE), I do not see my ping request

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                I think what you have done there on BUREAUTIQUE should work.
                What firewall rules are on OpenVPN? Maybe the packet/s are bring blocked by the firewall?
                Anyone see the problem here?

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • F
                  fab1330
                  last edited by

                  @phil.davis:

                  What firewall rules are on OpenVPN? Maybe the packet/s are bring blocked by the firewall?

                  On all interfaces, I authorize any

                  I am surprised not to find other posts similar to my problem. There must be others who have NAT configured with OpenVPN

                  1 Reply Last reply Reply Quote 0
                  • P
                    phil.davis
                    last edited by

                    I found an example of this on my network - I have a WiMax device at a remote siteB. It is not in bridge mode, it is an upstream hop from the pfSense there, but it does not know anything about my internal network. It sees all traffic NATed from pfSense as coming from "WIMAXaddress", its address itself is "WimaxGW".
                    INF_Subnets is an alias that contains all internal addresses across the various office networks that are all VPN'd together.
                    I have a rule on WIMAX interface to NAT traffic from all of INF_Subnets when it goes out WIMAX.
                    Right now I am VPN'd into siteA. I can ping and traceroute to the IP of WimaxGW - the traffic goes from my laptop, across road-warrior VPN to siteA, across another VPN to siteB, then is NATed out WIMAX interface using WIMAXaddress to WimaxGW. WimaxGW replies to WIMAXaddres fine, it is unNATed, and routed back across the 2 VPN links to me.
                    Your setup should work in a very similar way.
                    Do some traceroute from SiteA and packet capture to see where things get to a where they stop.

                    WiMax-NAT-rule.png
                    WiMax-NAT-rule.png_thumb

                    As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                    If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                    1 Reply Last reply Reply Quote 0
                    • F
                      fab1330
                      last edited by

                      @phil.davis:

                      I found an example of this on my network - I have a WiMax device at a remote siteB. It is not in bridge mode, it is an upstream hop from the pfSense there, but it does not know anything about my internal network. It sees all traffic NATed from pfSense as coming from "WIMAXaddress", its address itself is "WimaxGW".
                      INF_Subnets is an alias that contains all internal addresses across the various office networks that are all VPN'd together.
                      I have a rule on WIMAX interface to NAT traffic from all of INF_Subnets when it goes out WIMAX.
                      Right now I am VPN'd into siteA. I can ping and traceroute to the IP of WimaxGW - the traffic goes from my laptop, across road-warrior VPN to siteA, across another VPN to siteB, then is NATed out WIMAX interface using WIMAXaddress to WimaxGW. WimaxGW replies to WIMAXaddres fine, it is unNATed, and routed back across the 2 VPN links to me.
                      Your setup should work in a very similar way.
                      Do some traceroute from SiteA and packet capture to see where things get to a where they stop.

                      A big thank you for your help!

                      By dint of making test, by doing this, it works now :

                      Thanks again :)

                      Have a nice evening

                      1 Reply Last reply Reply Quote 0
                      • P
                        phil.davis
                        last edited by

                        No problem. Yes, what you have done will definitely work! I guess the traffic across the VPN then going out of pfSenseB to routerB was going across VILLES or WINRADIO interface.
                        The wide NAT rules you have now will hide siteA LAN address from all devices at siteB - that might be good for conectivity, but if, for example, you want to log client connections to a server in siteB LAN, then all connections from siteA will apear to come from a pfSenseB interface IP.
                        It all depends on your requirements and whether you want to spend time narrowing down the rules to only the NAT that is essential!

                        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                        1 Reply Last reply Reply Quote 0
                        • F
                          fab1330
                          last edited by

                          Yes I could restrict more NAT rules, but I have many networks behind pfSense A, so I prefer all open here:–)

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