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

    How to block Internet access for some devices but allow connections through VPN?

    Scheduled Pinned Locked Moved Firewalling
    9 Posts 4 Posters 2.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.
    • M
      MrGlasspoole
      last edited by

      I want to block some cams so that they have no Internet access and are only accessible through OpenVPN.

      Any tutorial or how-to out there?

      JKnottJ 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @MrGlasspoole
        last edited by

        @mrglasspoole

        The easiest way is to put them on their own subnet and use the firewall rules to block them from anything but the VPN. You'd need either a separate interface or VLAN to do this in pfsense.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        M 1 Reply Last reply Reply Quote 0
        • M
          MrGlasspoole @JKnott
          last edited by

          @jknott
          So its not easy :-)
          I never did something with VLANs

          JKnottJ noplanN 3 Replies Last reply Reply Quote 0
          • JKnottJ
            JKnott @MrGlasspoole
            last edited by

            @mrglasspoole

            A VLAN is just a way to logially separate networks. A VLAN appears as though it were a separate network. You can add a VLAN to pfsense and configure a subnet on it. You then use a managed switch to control where the VLANs appear. VLANs are commonly used for things like sharing a LAN connection for a computer and phone, with them on different subnets. Another common use is for a guest WiFi connection to an access point. If you can configure an Ethernet port, you can configure a VLAN.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            1 Reply Last reply Reply Quote 0
            • AndyRHA
              AndyRH
              last edited by

              I have 2 camera rules. One allows them to talk to another subnet and the 2nd blocks the internet. Maybe something similar for a VPN. Order is important.

              262c1210-6233-4f19-b053-9cdf7d84ed38-image.png

              o||||o
              7100-1u

              JKnottJ 1 Reply Last reply Reply Quote 0
              • JKnottJ
                JKnott @AndyRH
                last edited by

                @andyrh

                If all the cameras are on the same subnet, that rule that lets them "talk" to each other will never be used.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @MrGlasspoole
                  last edited by

                  @mrglasspoole

                  Another possibility is to put all the cameras into a subset of the subnet, so that anything within that subnet can be filtered.

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  1 Reply Last reply Reply Quote 0
                  • AndyRHA
                    AndyRH
                    last edited by

                    Wireless200 was a test AP directly off of the FW. Without the rule they could not talk to anything on it. The cameras are not on wireless200.

                    o||||o
                    7100-1u

                    1 Reply Last reply Reply Quote 0
                    • noplanN
                      noplan @MrGlasspoole
                      last edited by

                      @mrglasspoole

                      Easy.
                      Set fixed ip on the cam
                      Make alias (hosts) for the Cams
                      Block access to Wan for alias
                      Select any protocol
                      Done

                      They are now not allowed to Wan
                      Can still be accessed via VPN

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