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

    [SOLVED] PFSENSE ROUTING SEVERAL OFFICE

    Scheduled Pinned Locked Moved Routing and Multi WAN
    9 Posts 3 Posters 1.3k 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.
    • ?
      A Former User
      last edited by

      Hi, please anybody help me the last admin network have the next schema, theconnection is by vpn

      [CITY1]                  [CITY02]                [CITY03]
          [ROUTER 1]              [ROUTER 2]            [ROUTER 3]
      (192.168.100.30)  (192.168.100.40)    (192.168.100.50)
              |                      /  _____________|
              |                    /  /
              |                    /  /                    [CITY04]
        [ROUTER MAIN]–-------------------[ROUTER 4]
        (192.168.100.3)                        (192.168.100.60)

      But hi have a rules of routing, is this:

      route add -net 192.168.100.30 netmask 255.255.255.0 gw 192.168.100.3 dev eth1
      route add -net 192.168.100.40 netmask 255.255.255.0 gw 192.168.100.3 dev eth1
      route add -net 192.168.100.50 netmask 255.255.255.0 gw 192.168.100.3 dev eth1
      route add -net 192.168.100.60 netmask 255.255.255.0 gw 192.168.100.3 dev eth1

      Please any can how configure this in pfsense? how can connect the other zones to my pfsense i attachment the schema of network
      diagrama.png
      diagrama.png_thumb

      1 Reply Last reply Reply Quote 0
      • R
        remonv76
        last edited by

        route add -net 192.168.100.30 netmask 255.255.255.0 gw 192.168.100.3 dev eth1 -> You are adding 192.168.100.0 as the complete ip segment.
        So you are actually adding 4 times the same route.
        This is the same as all the 4 routes you added:  route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.100.3 dev eth1

        If you want to add 192.168.100.30 as a host, use the following.
        route add -host 192.168.100.30 gw 192.168.100.3 dev eth1

        If you want to add a subnet of 192.168.100.0, for instance 192.168.100.16 - 192.168.100.32, you need to supernet the netmask.
        16 ip addresses = netmask 255.255.255.240

        route add -net 192.168.100.16 netmask 255.255.255.240 gw 192.168.100.3 dev eth1      (192.168.100.16 - 192.168.100.31)
        route add -net 192.168.100.32 netmask 255.255.255.240 gw 192.168.100.3 dev eth1      (192.168.100.32 - 192.168.100.47)
        route add -net 192.168.100.48 netmask 255.255.255.240 gw 192.168.100.3 dev eth1      (192.168.100.48 - 192.168.100.63)
        route add -net 192.168.100.64 netmask 255.255.255.240 gw 192.168.100.3 dev eth1      (192.168.100.64 - 192.168.100.79)

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by

          Thanks remonv76 by you response but this rule can be add to the GUI of pfsense in this case where put it?

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

            If you post subnetting that makes sense someone can tell you what to put where.

            You are looking for System > Routing in general.

            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
            • ?
              A Former User
              last edited by

              Thanks by your response but i can create a virtual router by simulate the connection?

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

                The subnetting/routes you posted is nonsensical.

                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
                • ?
                  A Former User
                  last edited by

                  Anybody can tell me how i can probe this rule in a laboratory with virtual routers

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User
                    last edited by

                    Hi in my firewall is the next configuration, this is right? how i can configure this on my GUI pfsense.

                    unnamed.png
                    unnamed.png_thumb

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

                      Create a gateway for 192.168.100.3. This should be created on the interface used to reach that gateway.

                      Add static routes for all of those to that gateway

                      This is all done in System > Routing

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