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

    2 Pfsense with one gateway

    Scheduled Pinned Locked Moved NAT
    4 Posts 2 Posters 920 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.
    • I
      irs
      last edited by

      I have a problem that I have two locations with only one internet connectivity.

      Location 1 and 2 have fiber cable

      location 1 have internet

      no my goal is to access internet from location 2

      I have two fiber cards configured on each pfsense

      Need to allow two different subnets

      Location 1
      WAN static ip
      LAN: 192.168.10.1 DHCP ON
      Opt1: Fiber optic cable 192.168.20.1 DHCP ON

      Location 2
      WAN: Fiber cable
      LAN: 172.1.100.1 DHCP ON

      I am unable to get the wan ip on location 2

      what should I do to get the location 2 firewall wan?

      appreciate your help and guidance

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        172.1 ??  That is public space.. Guessing you meant 172.16-31?

        So the connection with internet the opt1 interface would just be like another lan..  This network you use on the fiber would be a "transit" network.. there would be zero reason to run dhcp on it.. But you could but kind of pointless.

        Anyway so lets call pfsense with internet opt1 192.168.20.1 and the wan on the other site would be 192.168.20.2 this transit need not be larger than /30 but you can use whatever mask you want..

        On pfsense with internet you would create a gateway (not on the opt1 interface) to 192.168.20.2 and then create route for your 172.16.100/24 network.
        On your 2nd location I would turn off NAT since no reason to nat rfc1918 to rfc1918 and your site with internet will nat it for you..  Create rules on your opt1 interface to allow the traffic you want from the downstream networks.  Make sure your outbound nat is setup to nat this downstream network - it should auto do that when you create the route.

        On the downstream pfsense default route on its wan would be 192.168.20.1 just like any other typical setup.  It just does not really need to nat.  Traffic you want to allow from internet site lan network would have to be allowed on the 2nd sites wan firewall rules.

        This is no different than any downstream pfsense router on pfsense be it the transit is ethernet or fiber be it 5 ft or 2 miles, etc..

        fiberconnection.png
        fiberconnection.png_thumb

        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
        • I
          irs
          last edited by

          @johnpoz:

          172.1 ??  That is public space.. Guessing you meant 172.16-31?

          So the connection with internet the opt1 interface would just be like another lan..  This network you use on the fiber would be a "transit" network.. there would be zero reason to run dhcp on it.. But you could but kind of pointless.

          Anyway so lets call pfsense with internet opt1 192.168.20.1 and the wan on the other site would be 192.168.20.2 this transit need not be larger than /30 but you can use whatever mask you want..

          On pfsense with internet you would create a gateway (not on the opt1 interface) to 192.168.20.2 and then create route for your 172.16.100/24 network.
          On your 2nd location I would turn off NAT since no reason to nat rfc1918 to rfc1918 and your site with internet will nat it for you..  Create rules on your opt1 interface to allow the traffic you want from the downstream networks.  Make sure your outbound nat is setup to nat this downstream network - it should auto do that when you create the route.

          On the downstream pfsense default route on its wan would be 192.168.20.1 just like any other typical setup.  It just does not really need to nat.  Traffic you want to allow from internet site lan network would have to be allowed on the 2nd sites wan firewall rules.

          This is no different than any downstream pfsense router on pfsense be it the transit is ethernet or fiber be it 5 ft or 2 miles, etc..

          My network requirments:

          I have two offices running on one Internet and as i told earlier.

          Do you still recommend i should disable NAT on the 2nd pfsense?

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            There is zero reason for a downstream router running rfc1918 space to nat..  You only need to at the edge where you change from rfc1918 to public.  Or if you have rfc1918 space that overlaps each other.

            If you nat at your downstream router than any traffic that needs to come from the upstream network will have to be port forwarded into your downstream network..  PITA if you ask me, especially if you have more than 1 box on the downstream network running specific services, etc.

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