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

    Isolate VLAN but pass DHCP & Internet?

    Scheduled Pinned Locked Moved Firewalling
    20 Posts 4 Posters 3.2k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by

      well look on pfsense - what is its wan IP?  Hit that in your browser on the port you have your gui listening on, 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
      • P
        pfBasic Banned
        last edited by

        So removing all allow any rules on a lan we don't need to pass UDP on ports 67 & 68 for DHCP so long as dhcpd is running?

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

          @pfbasic.. when you enable dhcpd on an interface in pfsense.  Yes it creates rules that you can not see in the gui that allow dhcpd to function.

          You can view these rules if you want via cmd line.
          https://doc.pfsense.org/index.php/How_can_I_see_the_full_PF_ruleset

          Even if you just running a dhcp relay these rules are auto created.. Could you see the amount of forum traffic it would create if users had to create rules for dhcp to function ;)  While would like a way to show all rules… Sometimes its best not to confuse new users ;)

          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
          • P
            pfBasic Banned
            last edited by

            That is very cool, thank you! I guess I'll go delete that rule haha.

            1 Reply Last reply Reply Quote 0
            • A
              AR15USR
              last edited by

              @johnpoz:

              well look on pfsense - what is its wan IP?  Hit that in your browser on the port you have your gui listening on, etc.

              I could not reach the gui at the WAN IP from the VLAN.


              2.6.0-RELEASE

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

                Then you did it wrong. There is nothing in those rules blocking the same. The traffic will be passed by the last rule.

                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

                  So you either altered your rules, or went to wrong IP or port.  There is nothing in those rules that stops a box on the opt net from talking to any port it wants on the firewalls opt net interface, or the wan IP via optnet.. So yeah your going to be able to hit the pfsense web gui, ssh to pfsense, 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
                  • A
                    AR15USR
                    last edited by

                    Here is what I did.

                    • Plugged laptop into correct vlan port on switch (laptop received correct IP, 192.168.20.5)

                    • Browsed via Chrome to my public IP supplied from ISP on the correct port

                    • Browser could not reach the gui

                    Could it be because I have the "Block private networks and loopback addresses" and "Block Bogons" options checked on the WAN interface?


                    2.6.0-RELEASE

                    1 Reply Last reply Reply Quote 0
                    • A
                      AR15USR
                      last edited by

                      I've added this rule to block the WAN. I've tried to browse to the WAN IP and it cant reach it..

                      rule4.jpg
                      rule4.jpg_thumb


                      2.6.0-RELEASE

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

                        Just pass the specific things on the firewall you want them to be able to access (like DNS) then block any to This Firewall (self).

                        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
                          AR15USR
                          last edited by

                          Does that last pic of the rule set achieve what I'm after? Blocking IOTnet from everything except the internet? That's all I'm trying to do.

                          It seems like it does based on trying to access things from the laptop when plugged into the IOT vlan port.


                          2.6.0-RELEASE

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

                            This firewall (self) makes more sense as the destination of your last rule than WAN net.

                            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
                              AR15USR
                              last edited by

                              @Derelict:

                              This firewall (self) makes more sense as the destination of your last rule than WAN net.

                              As soon as I switch it to "This Firewall (self)" devices on IOT loose internet connection fyi…


                              2.6.0-RELEASE

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

                                Well post up your current rules.. Yes if you block access to the firewall before you allow for dns say then no the internet is not going to work if your using pfsense for your dns.. Or if you running a proxy and block access to the firewall before you allow the proxy port, etc. etc.

                                Rules are evaluated top down as traffic enters the interface, first rule to trigger wins and no other rules are evaluated.  If the traffic is not allowed then it hits the default deny and would be blocked.

                                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
                                • A
                                  AR15USR
                                  last edited by

                                  I've added the DNS NAT forward  & rule that I did on the LAN interface (from the Squid setup post: https://forum.pfsense.org/index.php?topic=112335.0) to this interface as well. The devices are reaching the internet now.

                                  If there is a better way of forcing all devices to use pfsense for the DNS (I'm using the DNS resolver) please let me know..
                                  edit: found this: https://doc.pfsense.org/index.php/Redirecting_all_DNS_Requests_to_pfSense

                                  rule5.jpg
                                  rule5.jpg_thumb


                                  2.6.0-RELEASE

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