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

    SG-3100 - routing all internet access over IPSEC tunnel

    Scheduled Pinned Locked Moved IPsec
    33 Posts 5 Posters 3.3k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Ok, do you see any blocked TCP traffic in the logs at either site though?

      The video stream is probably UDP and pings which you said were working are ICMP so...

      Steve

      1 Reply Last reply Reply Quote 0
      • C
        ccb056
        last edited by

        Here's a packet capture log from the interfaces on both the local and remote routers during an sftp transfer (tcp/22)

        sftp file transfer packet capture.zip

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Hmm, so some of those seem OK, the local VTI cap for example.

          How exactly were those taken? Not all at the same time I assume? And did the transfer fail every time?

          Steve

          1 Reply Last reply Reply Quote 0
          • C
            ccb056
            last edited by

            One large download to the laptop was started over sftp.

            Then the packet captures were taken sequentially, first on the local router, and then on the remote router, during the single file transfer.

            After the packet captures were taken, the transfer was manually stopped.

            What I found interesting was there was traffic on the wan side of the local router that appeared to be going directly to the sftp server. I expected this to all be inside the IPSEC tunnel.

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

              What I found interesting was there was traffic on the wan side of the local router that appeared to be going directly to the sftp server. I expected this to all be inside the IPSEC tunnel.

              If that is the case (I have not looked at the captures) you are not routing/policy routing the traffic into the IPsec correctly.

              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
              • G
                gabacho4 Rebel Alliance @Derelict
                last edited by gabacho4

                @Derelict I'm having this very issue with two SG-5100s using routed IPSEC. Would you be able to explain your solution a little bit more so that I can understand what I need to do on my end.

                // I worked with a guy doing exactly this. He first tried this:
                LAN <-> VTI (OB NAT) <-> VTI <-> WAN (OB NAT) <-> Internet
                He changed it to this because of this limitation on NAT on the VTI interface:
                LAN <-> VTI <-> VTI <-> WAN (OB NAT) <-> Internet
                Setting the Outbound NAT on the WAN to NAT the LAN source addresses.
                All works fine. I think he said he's getting 500Mbps or more over it.
                You just have to make sure the WAN side has a gateway and a route back to the LAN network over the VTI.//

                I'm self taught and could use a slight hand holding on this one. Was super disappointed to encounter the issue using the routed IPSEC option but your info suggests current limitations can be overcome until the fix is made in FreeBSD. Appreciate any help you might be willing to provide.

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  What exactly do you have configured now? What works? What doesn't work?

                  The VTI interfaces have some limitations compared to other interface types, there is no reply-to feature due to where firewall rules are applied. Some NAT also cannot work because of that.
                  As long as you avoid those it should work.

                  Steve

                  G 1 Reply Last reply Reply Quote 0
                  • G
                    gabacho4 Rebel Alliance @stephenw10
                    last edited by gabacho4

                    @stephenw10 appreciate the response. This thread (see link below) sums up my issues and Derelict later responded referring me back to this thread. I’m just trying to understand the solution he provides. Just looking for some explanation of the steps he outlines.

                    Original thread I started:

                    https://forum.netgate.com/topic/141613/can-i-route-internet-traffic-from-site-b-through-site-a-via-ipsec-vti

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

                      Does this help?
                      IPsec VTI.png

                      ETA: better resolution and firewall rule box.

                      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)

                      G 1 Reply Last reply Reply Quote 1
                      • G
                        gabacho4 Rebel Alliance @Derelict
                        last edited by

                        @Derelict Most certainly. That's exactly how I have mine set up but am very glad to know this is how people smarter than I would do things. The biggest issue I suffer from is the 2xx ms latency due to distance between endpoints. Really do appreciate the extra help on this. Time is valuable and you let me have a little of yours.

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

                          @ngoehring123 Yeah. Can't help you with the latency. Glad it helped.

                          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
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.