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.1k 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 need to ping from 192.168.1.15 to something external like 8.8.8.8. Then look at the states it's generating at both ends.

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

        e2112f12-91c8-4bc3-8dc5-399382843cdd-image.png

        0ae9d213-9cb1-4518-9672-9a64b395065a-image.png

        This is how the states are with the continuous ping for 1.1.1.1. I put 1.1.1.1 because I have google dns to be used like this for a better view

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

          Ok, so it's actually outbound NATing at the other end of the tunnel. You can see it appears as 10.0.2.1 rather than 192.168.1.15. So you may want to disable the NAT for the GRE interface at the client end.
          You can also see it's not NATing the traffic out of the WAN at that end so you need a rule to add that there. That rule will depend on whether you disable the NAT at the client end.

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

            @stephenw10
            Can you tell me where I can disable NAT?
            For GRE tunnel only. I have the ip 192.168.1.2 with NAT for port 8006 going out through my WAN since it doesn't need protection that ip.
            Thanks

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

              @stephenw10

              I've already disabled NAT only in the tunnel on the pfsense client and it's already here without NAT. Now it will just be creating a static route right?

              5a3a5a16-c99d-432e-b042-de95bdc617d5-image.png

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

                Ok, so you need to add an Outbound NAT rule on that side for 192.168.1.0/24 on WAN.

                If you have added a static route back to the main side I would expect the auto outbound rules to cover that so I assume there is not.

                Steve

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

                  I have now bought a new ip since I don't want to use the router's ip on the machines

                  3bd3a726-de23-414b-8e09-21f4f37ea992-image.png

                  I configured it on the windows machine like this and created a VLAN on the pfsense client.

                  8abaab0c-f87a-4c2f-84d6-7e476b58e7fb-image.png

                  I'm constantly pinging from the windows machine to 1.1.1.1 and in the pfsense host states it is received like this

                  eef27ac0-ed55-4da3-a076-153c3abbc0e1-image.png

                  In the NAT part of the pfsense host I configured it like this ie the ip 185.113.141.145 is the ip wan of the pfsense host and I don't want to use it for anything else. And the ip 185.113.141.150 I want to be used in my virtual machine.

                  756694bf-d724-48a9-a364-f436d144cc5b-image.png

                  The only problem is that the machine is without internet for the ip 185.113.141.150

                  21a4ddc6-c82c-465c-ba80-6dcddbf48a8b-image.png

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

                    You can't use that IP directly on the client because that conflicts with the WAN subnet at the remote site.
                    Instead you need to add that as a VIP on the WAN at the remote site and then NAT the traffic to it.

                    Steve

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

                      I already added the virtual ip.
                      To do the nat routing is as follows?
                      47c026f2-d78f-4beb-9e8e-adece776a89a-image.png

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

                        Which end is that rule on?

                        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.

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

                          I liked to use the ip 185.113.141.150 on the windows machine is this not possible?
                          This rule was in remote pfsense.

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