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

How to set ip range on LAN same as WAN range ip

Scheduled Pinned Locked Moved General pfSense Questions
16 Posts 4 Posters 1.2k 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.
  • P
    pflover
    last edited by Nov 3, 2021, 12:58 PM

    hi. i have a problem with pfsense.
    my problem is that i can not set ip address on LAN interface same WAN interface. for example my WAN ip is:
    93.115.150.25/28
    and my server is 93.115.150.152/28 and my server have public ip. and also my server and my pfsense are on a same network with same gateway.
    for connecting my server to my LAN in pfsense i can not set ip in range of WAN and Server.
    i want that my server can not connect to internet directly and will can connect to internet only via pfsense. how can i do for this job?

    V 1 Reply Last reply Nov 3, 2021, 1:30 PM Reply Quote 0
    • V
      viragomann @pflover
      last edited by Nov 3, 2021, 1:30 PM

      @pflover said in How to set ip range on LAN same as WAN range ip:

      my problem is that i can not set ip address on LAN interface same WAN interface. for example my WAN ip is:
      93.115.150.25/28
      and my server is 93.115.150.152/28 and my server have public ip.

      These IP ranges are not overlapping. So there should be no problem to assign one to WAN and the other one to LAN at all.

      So not clear, what's your real issue here and what you're trying to achieve.
      Possibly you're looking for Bridging?

      P 1 Reply Last reply Nov 3, 2021, 5:05 PM Reply Quote 0
      • P
        pflover @viragomann
        last edited by Nov 3, 2021, 5:05 PM

        @viragomann
        i want that my server can not connect to internet directly and will can connect to internet only via pfsense. how can i do for this job?

        J V 2 Replies Last reply Nov 3, 2021, 5:17 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @pflover
          last edited by Nov 3, 2021, 5:17 PM

          @pflover just put your server behind pfsense and you can limit where it can and can not go off its own network, or even the same network if your bridging. As long as the other IPs are on the other side of the bridge than the server.

          How you do that is up to you - routed public netblock, natting from public to rfc1918 space or bridge if your isp is going to give you some /29 for example.

          Common setup is just to just use rfc1918 space, then either port forward or 1:1 nat for stuff to get to that server via some public IP. This could be a VIP on your wan interface if your isp has given you more than 1 public IP to work with.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • V
            viragomann @pflover
            last edited by Nov 3, 2021, 5:17 PM

            @pflover
            There are two ways. Either you bridge WAN with an internal interface as described in the Bridged docs section mentioned above.
            Or in case the public subnet for the server is routed to your WAN IP, you can configure it on an internal interface with its own gateway. See the chapter Routing Public IP Addresses in the docs.

            In both cases the traffic between Internet and your server has to pass pfSense and you're able to restrict it.

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Nov 3, 2021, 8:27 PM

              Yeah the examples you gave are not conflicting subnets so there's no problem assigning one as WAN and and one as LAN.
              Is that not actually the case?

              Steve

              P 1 Reply Last reply Nov 4, 2021, 6:01 AM Reply Quote 0
              • P
                pflover @stephenw10
                last edited by Nov 4, 2021, 6:01 AM

                @stephenw10
                i have pfsense with ip address: 86.25.32.21
                and my server is : 86.25.32.23
                and gateways of pfsense and server is : 86.25.32.20
                i have LAN interface on pfsense that when i trying to set ip 86.25.32.25 i get this error :
                IPv4 address 86.25.32.25/32 is being used by or overlaps with: WAN (86.25.32.21/28)

                i have this problem.
                my purpose is my server can not connect to internet directly and only can connect to internet through pfsense.
                please help me

                V 1 Reply Last reply Nov 4, 2021, 8:24 AM Reply Quote 0
                • V
                  viragomann @pflover
                  last edited by Nov 4, 2021, 8:24 AM

                  @pflover said in How to set ip range on LAN same as WAN range ip:

                  i have LAN interface on pfsense that when i trying to set ip 86.25.32.25 i get this error :
                  IPv4 address 86.25.32.25/32 is being used by or overlaps with: WAN (86.25.32.21/28)

                  That might be true. 86.25.32.25 is part of the WAN network 86.25.32.21/28, so you cannot use this IP on LAN.

                  The only option to use a public IP out out of the WAN network behind pfSense is bridging the interface as described in the docs.

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Nov 4, 2021, 2:42 PM

                    Yup, that^. In that situation you can only use bridged interfaces.

                    J 1 Reply Last reply Nov 4, 2021, 3:33 PM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator @stephenw10
                      last edited by Nov 4, 2021, 3:33 PM

                      Bridging is not the only way - he could just nat it and use a vip for whatever public IP he wants to use and either port forward the specific ports he needs or 1:1 nat

                      Which would be far easier and less complex setup than a bridge - and less likely for a security screw up if using port forwards.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Nov 4, 2021, 3:56 PM

                        Yup that's true if the server doesn't require a public IP directly.
                        I'd thought it did but reading back now it's not clear.

                        J 1 Reply Last reply Nov 4, 2021, 4:41 PM Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator @stephenw10
                          last edited by Nov 4, 2021, 4:41 PM

                          @stephenw10 said in How to set ip range on LAN same as WAN range ip:

                          server doesn't require a public IP directly.

                          It would be a very odd scenario where it HAD to be public.. Like some license hard locked to having to see public IP? I really can not think of a scenario that it wouldn't be better to just nat..

                          Unless there is a specific reason that public IP on the device is required - which can not think of.. Something needed with L2 from the isp maybe? Doubtful.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Nov 4, 2021, 5:38 PM

                            Unfortunately it's something we see quite often. Some server/application that will only use it's local IP with no way to be configured for an external public IP or detect it automatically.
                            I agree, it shouldn't ever happen in 2021 but....

                            J 1 Reply Last reply Nov 5, 2021, 1:12 PM Reply Quote 0
                            • J
                              johnpoz LAYER 8 Global Moderator @stephenw10
                              last edited by Nov 5, 2021, 1:12 PM

                              @stephenw10 You mean like a ftp server handing out its IP to connect to via passive?

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Nov 5, 2021, 2:09 PM

                                Yup, exactly like that. PBXs are also relatively common. Other more obscure appliances etc.

                                J 1 Reply Last reply Nov 5, 2021, 2:21 PM Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator @stephenw10
                                  last edited by Nov 5, 2021, 2:21 PM

                                  @stephenw10 that is just SAD at so many levels.

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  1 Reply Last reply Reply Quote 0
                                  16 out of 16
                                  • First post
                                    16/16
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                    This community forum collects and processes your personal information.
                                    consent.not_received