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

    Gre tunnel to protect IP.

    Scheduled Pinned Locked Moved General pfSense Questions
    63 Posts 2 Posters 10.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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      You can't use the public IP on the Windows machine directly unless it is bridged (layer 2) to the remote WAN somehow. You can't use a routed tunnel like you are now.

      S 1 Reply Last reply Reply Quote 0
      • S
        s_serra @stephenw10
        last edited by

        What other possibilities can I use?

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

          @stephenw10 said in Gre tunnel to protect IP.:

          I expect to see the client using 192.168.1.15 and then that traffic to pass without NAT at the local pfSense. Then at the remote pfSense that IP should be NAT'd to the WAN IP or the VIP.

          Like I said ^.

          S 2 Replies Last reply Reply Quote 0
          • S
            s_serra @stephenw10
            last edited by s_serra

            Yes, I'm already doing that. Now I use NAT 1:1 or Outbound?

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

              Is it working? Does the expected external IP show in test site?

              S 1 Reply Last reply Reply Quote 0
              • S
                s_serra @stephenw10
                last edited by

                I created the rule like this and it worked.

                90921b3b-11a9-495f-9ae4-03fe3fc95bea-image.png

                641ab06f-bbcf-4abd-8306-d5a8a741175b-image.png

                The only problem now is the ports are not working.
                And they are open on the firewall.

                1 Reply Last reply Reply Quote 0
                • S
                  s_serra @stephenw10
                  last edited by

                  On remote host i recive the packets on wan interface.

                  d7dc33e9-787d-49cf-a28f-fbfc148fa955-image.png

                  If i change for the gre interface the packets not are sended

                  8db265c4-2fe8-4aaa-a80c-b483ccc01cb7-image.png

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

                    Ah, you need traffic to work inbound as well?

                    You captured that on the GRE interface? That's surprising if so. I might expect to see that on the WAN...

                    Anyway if you need inbound and outbound traffic then I would use a 1:1 NAT rule at the remote side instead of the outbound NAT rule.
                    You will also need firewall rules on the WAN there to pass whatever traffic you need.
                    And you will need a static route to 192.168.1.0/24 via the GRE gateway so it knows where to send traffic.

                    Steve

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      s_serra @stephenw10
                      last edited by s_serra

                      Yes I want to open ports on the machine and they are available for that ip.

                      I did this on the remote host but it still doesn't work. In packet capture I analyze the gree interface (remote host) and nothing gets there.

                      5b740d78-b84c-449d-bf51-b5040242cec7-image.png

                      6a9de4c9-6676-4003-a09b-dee53a21f9df-image.png

                      d4cc9a1c-3e37-4d2d-91c9-124d94c17dea-image.png

                      Is there a better way to do what I'm trying to do?

                      Thanks for the help

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

                        The WAN rule there needs to be:
                        Source: any
                        Destination: 192.168.1.150
                        Destination port: 3389 (or an alias of whatever ports you want to allow)

                        Steve

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          s_serra @stephenw10
                          last edited by

                          It worked, thanks a lot for the help.
                          Is there any better way to do this? It will be for VPS use.
                          What I would really like to do is add the public IP directly to the VPS.
                          Thanks again for the help, I really appreciate it.

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

                            To use a public IP directly you would need to have a small subnet that is routed to you that you can then use internally.
                            Either that or bridge the connections so it appears as one layer 2. You might be able to do that with OpenVPN in TAP mode instead of GRE but I would not recommend it.

                            Steve

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              s_serra @stephenw10
                              last edited by

                              @stephenw10 OK thank you. So in your opinion this is the best solution right?

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

                                It is for the way the IPs you have are provisioned, yes.

                                If you're able to get a routed subnet then a fully routed solution would be cleaner. You'd probably need to pay for a /29 though which you may not need.

                                Steve

                                S 2 Replies Last reply Reply Quote 0
                                • S
                                  s_serra @stephenw10
                                  last edited by

                                  @stephenw10 Understood! Thank you very much.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    s_serra @stephenw10
                                    last edited by

                                    Hi @stephenw10 ,

                                    I will probably buy a /28 since my clients have increased and I am using about 10 ips. Could you give me some tips on how to do "fully routed solution " as mentioned above. I would be grateful.

                                    Thanks

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

                                      You need to have a routed subnet. So that means the provider at the remote side needs to route the /28 to you via the WAN IP which must be in a different subnet.
                                      Then you can route traffic to/from that subnet however you wish. Including routing it across the GRE tunnel and using it directly on clients at the local end.

                                      Steve

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        s_serra @stephenw10
                                        last edited by

                                        I've been having a problem which is high CPU utilization on the remote host. The system only has 1 vCPU 3.40Ghz but I think I must have something wrong. I had to check and in the traffic graph option the wan interface of the pfsense remote is using a lot of bandwidth and in the dashboard it doesn't happen.
                                        I send the prints below so you can better understand the problem.

                                        Thanks

                                        Screenshot 2022-08-29 215643.png Screenshot 2022-08-29 215353.png Screenshot 2022-08-29 215305.png

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

                                          Hmm, curious. Those graphs should show the same data.

                                          What are the IPs shown as generating the traffic there? .145 and .160?

                                          Check the state tables. What are the states being created by that?

                                          Steve

                                          S 1 Reply Last reply Reply Quote 0
                                          • S
                                            s_serra @stephenw10
                                            last edited by s_serra

                                            The ip .145 is the remote pfsense ip used only to access the pfsense graphical interface and to establish the gre tunnel with the local pfsense. The other ip's are from virtual machines that probably run game servers.

                                            Thanks

                                            States: https://pastebin.com/JzsHJezE

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