[SOLVED] PFSENSE ROUTING SEVERAL OFFICE



  • 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



  • 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)



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


  • Netgate

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

    You are looking for System > Routing in general.



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


  • Netgate

    The subnetting/routes you posted is nonsensical.



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



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



  • Netgate

    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