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

Problem with TCP and GRE tunnel

Scheduled Pinned Locked Moved General pfSense Questions
64 Posts 3 Posters 8.6k 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.
  • S
    stephenw10 Netgate Administrator
    last edited by Apr 1, 2024, 10:49 PM

    Hmm, same both ways?

    Try using one of the other IPs on the server as the target. The GRE endpoint IP can behave in an odd way.

    S 1 Reply Last reply Apr 1, 2024, 10:57 PM Reply Quote 0
    • S
      StomperG @stephenw10
      last edited by Apr 1, 2024, 10:57 PM

      @stephenw10 I tried but or give me firewall problem because the port isnt exposed or give me that

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Apr 1, 2024, 11:04 PM

        Which way are you testing? The server end should listen on all available IPs by default. I would expect the client end to have a route to any of them.

        S 1 Reply Last reply Apr 1, 2024, 11:10 PM Reply Quote 0
        • S
          StomperG @stephenw10
          last edited by Apr 1, 2024, 11:10 PM

          @stephenw10 Im starting the server on the VPC (from the company where i bought the IP's and VPC) and client on the local pf VM

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Apr 1, 2024, 11:19 PM

            Ok so you should be able to use the VPC WAN address as the target for the client.

            S 1 Reply Last reply Apr 2, 2024, 12:27 AM Reply Quote 0
            • S
              StomperG @stephenw10
              last edited by Apr 2, 2024, 12:27 AM

              @stephenw10
              dfa21eb8-9f3c-42e7-baeb-cc5591faa967-image.png

              1 Reply Last reply Reply Quote 0
              • S
                stephenw10 Netgate Administrator
                last edited by Apr 2, 2024, 12:29 AM

                Aha, and that could be the problem. That IP is in the same /24 as the local LAN side clients. If you have those set to a /24 subnet it will try to ARP for it directly and fail.

                S 1 Reply Last reply Apr 2, 2024, 12:35 AM Reply Quote 0
                • S
                  StomperG @stephenw10
                  last edited by Apr 2, 2024, 12:35 AM

                  @stephenw10 Uh, im very noob with this sorry, what exacly i need to change?

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Apr 2, 2024, 12:48 AM

                    Ok we're back to how the VPC is providing the IPs to you. You have 4 consecutive IPs at the local pf LAN? Including the pf LAN interface address?

                    The VPC pf WAN address is not consecutive to those?

                    You probably need to device those into to subnets so routing works correctly.

                    The routing table at the local pf cannot include the remote side WAN address.

                    The remote side must be using a smaller subnet than /24 because otherwise connectivity would be completely broken.

                    S 1 Reply Last reply Apr 2, 2024, 7:54 PM Reply Quote 0
                    • S
                      StomperG @stephenw10
                      last edited by Apr 2, 2024, 7:54 PM

                      @stephenw10 But my lan IP (185.113.141.1 ) is private on my lan and is the public gateway from the ISP and isn't being forwared trough the tunnel. My 4 ips are (185.113.141.214, 185.113.141.215,185.113.141.216, 185.113.141.217)
                      On the VPC pf i've 185.113.141.132 as WAN IP

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Apr 2, 2024, 8:28 PM

                        What subnets do you have on those interfaces?

                        @StomperG said in Problem with TCP and GRE tunnel:

                        my lan IP (185.113.141.1 ) is private on my lan and is the public gateway from the ISP

                        Hmm do you mean the LAN interface on the local pf is using the gateway IP address of the VPC side pf?

                        That would certainly break routing. It's surprising that ping works to be honest.

                        S 1 Reply Last reply Apr 2, 2024, 8:37 PM Reply Quote 0
                        • S
                          StomperG @stephenw10
                          last edited by StomperG Apr 2, 2024, 8:38 PM Apr 2, 2024, 8:37 PM

                          @stephenw10
                          Local Pf:
                          8acfa2f1-4fbc-410e-884a-50c652b59cec-image.png
                          1bb6e573-7ec1-450c-a1c9-6d699ce1bd41-image.png

                          Remote Pf:
                          2e2afe2e-dfa9-4b32-a4af-48b92bedbbb5-image.png
                          aaf30f91-87b1-49bd-b367-87011ebd73f7-image.png

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Apr 2, 2024, 9:24 PM

                            What subnet size do you have on the local pf LAN or the hosts on it?

                            What subnet size is on the VPC pf WAN?

                            The fact this works at all implies the VPC provider must be routing the additional IPs to the VPN WAN address.

                            S 1 Reply Last reply Apr 2, 2024, 9:38 PM Reply Quote 0
                            • S
                              StomperG @stephenw10
                              last edited by Apr 2, 2024, 9:38 PM

                              @stephenw10 All ips I have are "single" i dont have an entire subnet

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Apr 2, 2024, 9:41 PM

                                Yeah those IPs are inconveniently not in a single /29!

                                But what subnet sizes (masks) do you have set on the interfaces?

                                S 1 Reply Last reply Apr 2, 2024, 9:54 PM Reply Quote 0
                                • S
                                  StomperG @stephenw10
                                  last edited by Apr 2, 2024, 9:54 PM

                                  @stephenw10

                                  Local pf:
                                  85dd52c0-40b9-4b17-ac6a-d9dfe1064e3d-image.png
                                  7f5b282b-9b1c-47cf-a122-7373bf85a918-image.png
                                  9a9fec18-7a7f-4078-a301-3d107feee0a8-image.png

                                  VPC pf:
                                  a629ce5c-2652-48c2-a6d1-c70f9498f3a5-image.png
                                  313dd502-4266-4a7f-8c54-3a3eb0606b62-image.png

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Apr 2, 2024, 10:24 PM

                                    OK so everything is /24 and thus you have the same subnet at both ends on the tunnel. Hence, routing conflict with that iperf command and anything else sourced from the firewall itself.

                                    Really you want those things is different subnets but because the remote WAN is using .132 you can't use /25 there.

                                    I would try to set the gateway as outside the subnet. There's a setting for that in the advanced gateway settings: 'Use non-local gateway'

                                    You can then set the remote WAN subnet to something much smaller, /32 even.

                                    Then you can set the other IPs in a different subnet such as 185.113.141.208/28. You can add that as the static route on the remote pf and then use the IPs directly on the local pf.

                                    The local pf LAN should use one of those IPs.

                                    As an alternative to all of that you could just add all the IPs at the remote side as VIPs and then NAT the traffic to/from them and use private IPs at the local LAN.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • S stephenw10 referenced this topic on Apr 6, 2024, 10:02 PM
                                    64 out of 64
                                    • First post
                                      64/64
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                      This community forum collects and processes your personal information.
                                      consent.not_received