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

    FIREWALL RULES FOR TRAFFIC BETWEEN INTERFACES

    Scheduled Pinned Locked Moved General pfSense Questions
    25 Posts 4 Posters 21.1k 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
      Summer
      last edited by

      Thanks for your help, but it seems I miss something.
      Tried to ping a device on opt2 from lan but still got a message of host unreachable, I've checked with wire shark what happen:
      as source I see the MAC of opt2 , destination broadcast, protocol ARP, info who has 192.168.2.33 ? tell 192.168.10.10
      why broadcast message are sended on lan from opt2?

      1 Reply Last reply Reply Quote 0
      • P
        podilarius
        last edited by

        Summer … I would put an allow all rule on all interfaces until you made sure that your routing is correct. Once you know routing is working correct, then you can go back and restrict traffic how you need to. Also,

        on pfSense
        LAN : 192.168.10.3/24
        OPT1: 192.168.1.3/24
        IP Alias on OPT1: 192.168.2.3/24

        Computers on LAN of pfSense use the gateway of 192.168.10.3.
        Computers on the OPT1 use either 192.168.1.3 or 192.168.2.3 as their gateway depending on the subnet they are on.

        If you have a different gateway for .1.0/24 and .2.0/24, you are going to have to create a route in that router to poing .10.0/24 to either .2.3 or .1.3 base on the subnet from which it comes. If you don't then setting up a route should not be necessary.

        I think that auto outbound NAT for WAN should be able to handle all the subnets and give them internet. If not you are going to have to create a rule in NAT to handle that.

        No additional route are needed as pfSense should be able to route to all the interface networks and the IP Alias network.
        Then you just have to deal with firewall rules allowing the traffic needed.

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

          podilarius! you've made it! :)  Really thanks for the help!

          the gateway on the opt2 devices make them availables from LAN.

          But I can ping the devices without gateway from the pfsense interface and get the reply, is there a way to forward the reply if the request cames from LAN?

          1 Reply Last reply Reply Quote 0
          • M
            Metu69salemi
            last edited by

            Yes there is, because normally router uses nearest interface to that network. so in this schema it used "gateway" ip-address which is in same subnet with those devices which has no gateway information

            1 Reply Last reply Reply Quote 0
            • P
              podilarius
              last edited by

              The reason you can ping them from pfSense is just the same as if you ping a computer on the same network. There is no need to route, since they are on the same subnet. Default gateways are just telling the computer that if it cannot find a route on its on, check with your default gateway. You can add a persistent route to the devices on opt2 if you need to keep the current default gateway separate from the pfSense machine. You would have to do that on all the devices. if you were to add a route to the that subnet's router then it would apply to all devices.

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

                Last question with a PC Win7, with 2 NIC on separate networks, one on OPT2 and one with default gateway that goes out without interesting pfsense, is there a way to reach the Nic on OPT2 network ?
                I mean I've added a route to network 192.168.10.0 with gateway 192.168.1.1, and changed metric of interfacs, but still can't communicate.

                1 Reply Last reply Reply Quote 0
                • M
                  Metu69salemi
                  last edited by

                  Give some more what you want to achieve and```
                  route print

                  1 Reply Last reply Reply Quote 0
                  • P
                    podilarius
                    last edited by

                    not really, but you can get to the machine on the default LAN, so why do you need to access it on opt2? You usually split networks with potentially a NIC in both subnets, usually to manage on both subnets.

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

                      The default LAN of the Win7 PC is different from the one of pfsense, that is the problem, i've got
                      NIC 1 : default LAN DIFFERENT from the LAN of Pfsense
                      NIC 2:  address on OPT2 network,

                      I've added a route to the LAN of Pfesense
                      IP ADDRESS      MASK                  GATEWAY      INTERFACE        METRIC
                      192.168.10.0    255.255.255.0    192.168.2.3  192.168.2.133    2000  >>> to reach LAN of pfsense
                      0.0.0.0    255.255.255.0    x.x.x.x  x.x.x.133    4000  >>> default LAN

                      If I tracert google from the win7 it pass trough  the x.x.x.x133, if tracert an address 192.168.10.x it doesn't call  the default  but goes directly to the address.
                      But if I ping the win7 pc from behind the LaN I can't reach it.

                      1 Reply Last reply Reply Quote 0
                      • M
                        Metu69salemi
                        last edited by

                        Weird mask you have on your default Wan connection. I have 0.0.0.0
                        And i think that no harm is made if you reduce your metric value of that on-site subnet

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

                          sorry I didn't copy and pasted, a writing error the correct one is

                          IP ADDRESS      MASK                  GATEWAY      INTERFACE        METRIC
                          192.168.10.0    255.255.255.0    192.168.2.3  192.168.2.133    2000  >>> to reach LAN of pfsense
                          0.0.0.0    0.0.0.0    x.x.x.x  x.x.x.133    4000  >>> default LAN

                          if I ping from ssh from  firewall I can get reply, if I do from LAN behind firewall  no.
                          The problem is that the others hosts, not with Win7 can be accessed from LAN behind firewall with the current rules.

                          1 Reply Last reply Reply Quote 0
                          • P
                            podilarius
                            last edited by

                            What is the status of the Windows firewall in the Win7 machine? usually Win 7 firewall will not accept connections from a subnet that is not represented by a NIC. Also check your RDP settings also to make sure you can connect from anywhere.

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