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

    Pfsense WAN port plugged into office LAN with same IP subnet..?

    Scheduled Pinned Locked Moved NAT
    7 Posts 4 Posters 2.7k 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
      spinjector
      last edited by

      I installed Pfsense on a PC with two interfaces, to test some things on our network. The WAN port is attached to the office network. The LAN port is attached to a switch and my laptop. Both the office LAN and the Pfsense LAN have the same subnet 192.168.0.1/24. For the test, neither of these can change.

      I would like to connect my laptop to a printer on the office LAN, on the other side of the WAN port. Of course, Pfsense and my laptop think it's in the same subnet, so no NAT takes place. But my true destination is on the other side of the WAN port.

      Can this connection be made..? If so, how..? Thanks.

      I do understand it may be that IP addresses that are passed to the other subnet cannot be used in the local one any more. But that's ok because the testing I'm doing is for some manufacturing equipment, and really has nothing to do with Pfsense or the networking involved.

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

        You are going to have to change something. You can't have two router interfaces on the same subnet. If the router has a packet for 192.168.1.100, what is it supposed to do with it?

        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
        • S
          spinjector
          last edited by

          But physically they're different. Yes, the subnet numbering is the same, BUT physically they're on different network segments. The WAN port is on the office network, and the LAN port is on a small switch and my laptop. My laptop is anle to access the internet fine, but because both subnets are 192.168.0.1/24, it's causing the problem that my laptop cannot connect to the printer on the other side of the WAN port. And of course…duh...this is obviously as it should be. BUT...is there any way to make it work, just for the one IP the printer is on..? A route, a firewall entry, anything..? Something where Pfsense forwards packets for an IP that's dead on the closer network, to the corresponding IP on the other one..?

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

            Dude. No. Again - if the router has a packet for 192.168.1.100 which interface is it supposed to send it on? Both?

            Renumber one of the subnets.

            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
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              "Can this connection be made..? If so, how..? Thanks."

              Sure it can, if you want to use the same network - then put them on the same network.  Just use pfsense as a bridge..  For what possible reason I don't know.  But if you want to use the same network on 2 different interfaces of pfsense then that is a bridge not a router.  So bridge them.. Now your machine behind pfsense can get IP from the same dhcp server as stuff in front of pfsense.  Or static, etc.

              Pfsense can be a bridge firewall, or transparent if you want, etc.  But what is the point really?  Why can you not just put a different network segment on pfsense lan?  This make it some much simpler and less complex, especially for person that has to come here and ask why it doesn't work when you put the same network on multiple interfaces on a router ;)  KISS is the way to go!!  That way would be just change the pfsense lan to be something other than what is on its wan network.

              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
              • JKnottJ
                JKnott
                last edited by

                And of course…duh...this is obviously as it should be. BUT...is there any way to make it work, just for the one IP the printer is on..?

                I guess you don't know about subnet masks etc.  What happens when a computer has a packet to send is it checks to see if the address is on the same subnet or not.  It determines this using it's address, the destination address and subnet mask.  If it determines the destination is on the same subnet, it sends out an arp request, containing the destination address over the local LAN.  This request is NOT passed by pfSense or any other router.  So, that attempt will fail.  If the computer determines the destination is on a different subnet, it will forward it via the router, using the routers MAC (not IP) address and the router will then forward as needed.  So, there is no way you can do what you want.

                ! am assuming you've got psSense configured as a router, as is typically the case

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • S
                  spinjector
                  last edited by

                  Ok, thanks. I do know about subnets, at least enough to choose masks properly to set up a 10.x.x.x network, with different kinds of devices on the different subnets (we had four at a broadcast facility I worked at). I thought perhaps Pfsense might had some sort of exception handling mechanism to treat specific requests differently.

                  The purpose of this project is to duplicate a manufacturing system we have (for testing purposes), with many unusual sensors and process controllers on one subnet, and the office LAN on the other. It's been proving to have some difficult lessons for me.

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