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

able to nmap scan across vlans

Scheduled Pinned Locked Moved L2/Switching/VLANs
7 Posts 2 Posters 3.0k 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.
  • G
    gi2r2ig
    last edited by gi2r2ig Jan 4, 2020, 4:52 PM Jan 4, 2020, 4:51 PM

    So i have my completed my pfsense build and configured multiple VLAN's. My guest vlan40 is on 10.0.40.0/24 subnet and has block rule to RFC1918 and pass rule to DNS. All good, except that my laptop on vlan40(guest) can run nmap and discover every devices on other vlan vlan30(iot). When i see firewall logs during scan, lot of things get blocked, but i can still see that it located devices on vlan30. I can replicate is behavior on all vlans. Is this normal? Or did i miss something in the rules.
    Screenshot from 2020-01-04 10-24-40.png

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Jan 4, 2020, 5:15 PM

      @gi2r2ig said in able to nmap scan across vlans:

      Or did i miss something in the rules.

      You would have to post them if you want info on that ;)

      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
      • G
        gi2r2ig
        last edited by Jan 4, 2020, 5:37 PM

        Here are my rules. Some might be redundant, but bare with me, i will get those fixed when i graduate in pfsense :)
        My laptop is in VLAN40 which is initiating nmap scan on VLAN30
        VLAN40.PNG GUEST: VLAN40

        Below rule is for the VLAN30.
        VLAN30.PNG

        This is my floating rules: All generated by pfblocker
        FLOATING.PNG

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Jan 4, 2020, 5:57 PM

          well your doing reject... so yeah anything you send that is blocked is going to send back a reject... So if you try and do nmap to something that sends back a reject.. Nmap would think its up, and port would be closed..

          So here - I put in a block to 192.168.3.32, ntp server on my dmz vlan.. I then do a nmap to that IP.. Notice nothing returned.. host looks down.

          block.jpg

          I now set the rule to "reject" and do the same scan... And it shows host is up, but all closed

          reject.jpg

          Now if you do a sniff while your scanning... You will see that pfsense is sending back RST for all the ports I tried to scan.. So to nmap... Hey must be "up" but all the ports are closed..

          RST.jpg

          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 1
          • G
            gi2r2ig
            last edited by Jan 4, 2020, 6:53 PM

            Thank you so much. I am glad issue was not what i expected. I was able to replicate this on my guest(vlan40) and got nothing.
            zenmap_scan_1.png
            So, it seems that if you don't want your Guest to know what's in your network, you will need "Block" rule instead of "Reject" rule.
            Interesting to see that nmap was able to identify devices on different subnet even with reject rules. I can understand [host up/down] based on response, but wasn't expecting detail host info.

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz Jan 4, 2020, 7:27 PM Jan 4, 2020, 7:25 PM

              Well he would do a dns query for it - dns is pointing to pfsense and allowed per your rules.. If he doesn't think the host is up, he won't bother to do a dns query.

              Reject is normally done on your networks, you want to know right away if something not going to connect.. Vs having to wait for timeouts and retrans. But wan or guest - yeah you might not want to do reject.

              If real guest network - just hand them some public dns via dhcp, etc.. And don't let them query pfsense for dns.

              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 1
              • G
                gi2r2ig
                last edited by Jan 4, 2020, 7:37 PM

                Got it. Once again thank you. I know what i need to do now.

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received