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

    Site-to-Site OpenVPN problem on 2.7.0, possibly affected by Outbound NAT

    Scheduled Pinned Locked Moved OpenVPN
    25 Posts 2 Posters 2.4k 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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      I forked this off into a new thread so it would all be together since it's likely a different issue than the post it was on before.

      What do the state table entries on each firewall look like when you try those ping tests?

      Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      F 1 Reply Last reply Reply Quote 0
      • F
        frater @jimp
        last edited by

        @jimp

        serverA = 192.168.17.1/23
        clientB = 192.168.1.1/23
        clientC = 192.168.18.1/23

        From device 192.168.1.4/23 I'm unsuccesfully pinging to 192.168.19.209/23

        e6ced3c3-4935-4e68-a26d-edea5838a7a3-image.png

        My guess is that the WAN-interface shouldn't be there.

        From device 192.168.19.209/23 I'm succesfully pinging to 192.168.1.4/23

        431b1f6e-e796-4ce5-bf72-48a43750320c-image.png

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          That WAN interface state definitely shouldn't be there, which means the two most likely causes are:

          1. There is no route in the table on that firewall for 198.168.19.0/23 so it falls through to the default route and out WAN
          2. The LAN firewall rules on there have a gateway set and are forcing the traffic out WAN

          As an extra protection against 1, consider adding reject rules on the Floating tab, quick, outbound, on your WAN(s), matching a destination of private networks (either an alias or a large enough mask to catch them all, such as 192.168.0.0/16). That will stop potentially private traffic from attempting to exit the WAN. Having that set to log is probably also a good idea.

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          F 1 Reply Last reply Reply Quote 0
          • F
            frater @jimp
            last edited by frater

            @jimp

            There was/is indeed a gateway rule on the LAN, but I disabled it just now....

            fd2d5b33-ac2c-4da0-b8e2-dca231805089-image.png

            F 1 Reply Last reply Reply Quote 0
            • F
              frater @frater
              last edited by

              @frater

              removing the gateway rule on the LAN tab was sufficient to get that WAN state gone
              I still can't ping to 192.168.19.209 from 192.168.1.4

              3f897b3a-5fee-4b4a-9b45-39339d6c23b2-image.png

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Since it appears to be making it to the VPN there, now you'd check the states, rules, and routing on the other nodes. Make sure the OpenVPN rules allow it on both the serverA and clientC firewalls, and check the states along each leg.

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                F 1 Reply Last reply Reply Quote 0
                • F
                  frater @jimp
                  last edited by frater

                  @jimp

                  I checked the LAN firewall again and noticed an autocreated rule pfB_PRI1_v4 of pfBlockerNG.
                  I removed it from pfBlockerNG and it started to work.

                  It was the ClientC network that was able to ping itself, but couldn't be pinged....

                  I'm still having this when I ping from pfsense clientB to pfsense clientC
                  I'm getting the answer from the oVPN ip if I don't give a source address:

                  /root: ping -c2 -S 192.168.1.1 192.168.18.1
                  PING 192.168.18.1 (192.168.18.1) from 192.168.1.1: 56 data bytes
                  64 bytes from 192.168.18.1: icmp_seq=0 ttl=63 time=11.856 ms
                  64 bytes from 192.168.18.1: icmp_seq=1 ttl=63 time=13.479 ms
                  
                  --- 192.168.18.1 ping statistics ---
                  2 packets transmitted, 2 packets received, 0.0% packet loss
                  round-trip min/avg/max/stddev = 11.856/12.668/13.479/0.812 ms
                  [2.7.0-RELEASE][root@pfSense.filmhallen.lan]/root: ping -c2 192.168.18.1
                  PING 192.168.18.1 (192.168.18.1): 56 data bytes
                  92 bytes from 10.0.16.1: Redirect Host(New addr: 10.0.16.2)
                  Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
                   4  5  00 0054 f430   0 0000  3f  01 9acd 10.0.16.2  192.168.18.1
                  
                  64 bytes from 192.168.18.1: icmp_seq=0 ttl=63 time=14.299 ms
                  92 bytes from 10.0.16.1: Redirect Host(New addr: 10.0.16.2)
                  Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
                   4  5  00 0054 83fc   0 0000  3f  01 0b02 10.0.16.2  192.168.18.1
                  
                  64 bytes from 192.168.18.1: icmp_seq=1 ttl=63 time=11.461 ms
                  
                  --- 192.168.18.1 ping statistics ---
                  2 packets transmitted, 2 packets received, 0.0% packet loss
                  round-trip min/avg/max/stddev = 11.461/12.880/14.299/1.419 ms
                  
                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    The redirect is sort of expected due to how OpenVPN handles its routing. It usually stuffs a dummy address in the table as a destination just to make sure the traffic gets handed off to OpenVPN and then OpenVPN deals with it from there, but depending on what is hitting what it may end up getting that kind of response.

                    As long as the traffic goes through it's not a huge concern.

                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      frater @jimp
                      last edited by

                      @jimp

                      I still have a problem pinging 192.168.19.209 even though I can ping it from the network itself.
                      It's a Windows machine, so I think that's a problem with that firewall not accepting a connection from other LANs

                      I moved an AP from 192.168.19.20 to 192.168.19.210 and I was able to ping it....
                      I will revisit this thread if I find out it has to be something else...

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        That sounds like a local network config issue on the target system. There are some cases where Windows will only accept inbound traffic from its own subnet unless it thinks it's on a certain type of network. Like if it's set to public vs private but maybe not exactly that.

                        If you need to fudge that you could setup a hybrid outbound NAT rule on the LAN to make the source of traffic appear to be the local network, but that can break or complicate certain protocols. It's best to fix the local network config on the client system.

                        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

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