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

    secure VPN with GeoIP

    Scheduled Pinned Locked Moved pfBlockerNG
    9 Posts 2 Posters 936 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.
    • R
      reynold
      last edited by

      Hi i'm using pfblocker.
      I defined GeoIP rules and I allow outbund connections towards entire Europe.
      So in GeoIP i'm allowing connections towards Europe (permit outbund)
      I need to set up a more specific rule.
      I'm using VPN SSL to reach my firewall.
      I would like to allow connection inbound to VPN on port 1194 only for IP located in Germany.
      How can i do that?
      thanks a lot

      NogBadTheBadN 1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad @reynold
        last edited by NogBadTheBad

        @reynold Yes, you can just create an alias and add it as a source on the VPN SSL rule on the WAN interface.

        My SFTP/SSH rule just includes the UK and I switch it on when someone needs to do a download to my SFTP server.

        Screenshot 2023-08-26 at 15.17.06.png

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        R 1 Reply Last reply Reply Quote 1
        • R
          reynold @NogBadTheBad
          last edited by

          @NogBadTheBad
          Thanks, i understand.
          But i'm not able to create alias in pfblocker.
          I did not found documentation.
          HOw can i do that?

          NogBadTheBadN 1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad @reynold
            last edited by NogBadTheBad

            @reynold

            Firewall -> pfBlockerNG -> IP -> IPv4

            Add

            Screenshot 2023-08-26 at 16.36.25.png

            Then hit save, you'll need to force an update.

            You can't mix IPv4 & IPv6 in a single alias.

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            R 1 Reply Last reply Reply Quote 0
            • R
              reynold @NogBadTheBad
              last edited by

              @NogBadTheBad
              Thanks a lot!
              I have another question.
              Using alias can i edit the rule and specify some port?
              For example i would like to allow traffic vs some countries only on port 80 and 443.
              Can i use alias in pfblocker for countries and then using alias that i created early in pfsense (for example web services port 80 and 443)?

              NogBadTheBadN 1 Reply Last reply Reply Quote 0
              • NogBadTheBadN
                NogBadTheBad @reynold
                last edited by NogBadTheBad

                @reynold You could create a port alias using Firewall -> Aliases -> Ports and use that, but IMO it makes more sense to have separate firewall rules for each port

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                R 1 Reply Last reply Reply Quote 1
                • R
                  reynold @NogBadTheBad
                  last edited by

                  @NogBadTheBad
                  I did it, but I'm not able to include port in pfblocker rule

                  NogBadTheBadN 1 Reply Last reply Reply Quote 0
                  • NogBadTheBadN
                    NogBadTheBad @reynold
                    last edited by

                    @reynold You can’t in the pfblocker section, you’d do it in the wan firewall page.

                    Andy

                    1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      reynold @NogBadTheBad
                      last edited by

                      @NogBadTheBad
                      thx I did it

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