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

    Access only one PC from another subnet

    Routing and Multi WAN
    2
    6
    839
    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.
    • T
      tiagowippel
      last edited by

      Hi guys,

      In my config i have 2 separated subnets (A: 192.168.62.0/24 and B: 192.168.65.0/24)

      I want to access only one IP of subnet B (192.168.65.11 for example) from any PC of subnet A

      How can I do that ? PFSENSE IP is 192.168.62.1

      Thanks

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

        On subnet A interface create an allow rule to that IP, then below that create a block list to subnet B..

        Below that would be your any any rule to the internet.

        Rules are evaluated top down, first rule to trigger wins, no other rules are evaluated.

        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.7.2, 24.11

        T 1 Reply Last reply Reply Quote 0
        • T
          tiagowippel @johnpoz
          last edited by

          @johnpoz I am afraid that I forgot to mention that the 2 subnets are on the same LAN, I have only one interface.

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

            Well that is borked.. You don't run multiple L3 on the same L2..

            If you only have 1 physical interface, then your 2nd network would be a vlan. So that they are actually isolated from each other. Do you have a vlan capable switch, AP? etc..

            While you could bounce traffic off pfsense via a VIP for the other network.. If the devices no matter what their IPs are on the same L2 network. There is nothing stopping them from talking to each other if they wanted too.

            If you want to isolate devices from each other, they need to be on different L2 (layer 2) networks. This is either done completely physical or with vlans.

            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.7.2, 24.11

            T 1 Reply Last reply Reply Quote 1
            • T
              tiagowippel @johnpoz
              last edited by

              @johnpoz understood, thanks for the help.

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

                If you need help setting that up - just ask..

                But if your goal is isolation - which I assume it is because your asking how to only allow 1 IP, and block others. Then you really need to create two different L2 networks (vlans or completely different physical networks - 2 interfaces on pfsense with 2 different dumb switches).

                Another option would be to just put them all on the same L2 (same L3 as well), but make it a private vlan... And then you can let X talk to Y, and A talk to D, but block Z from talking to A, etc. Via setting on your switch that support private vlans. But you need a switch that supports that.

                Simple solution to keeping A from talking to B, is put them on different actually isolated networks. And then filtering whatever traffic you want to allow/block on pfsense.

                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.7.2, 24.11

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