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

    Firewall rules doesn´t work with OpenVPN Interface

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    8 Posts 3 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.
    • N
      neriberto
      last edited by

      Hi everybody,

      This saturday I installed 2 pfsense RC 2 and I configured it to comunicate between the OpenVPN connection, this works fine, but when I created rules to deny some protocol and allow others, this doesn´t work. So I tried create just one rule to deny all protocolols. Well not work again.

      Sometimes I reset the states and worked, sometimes not, sometimes just after create the firewall rules worked…

      There are some bugs? How can I resolve it. thanks...

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

        Some details might be helpful ;)

        Is this a roadwarrior setup, site to site - what are you trying to block with the firewall rules.

        Can we see the actual rules you have setup?

        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
        • N
          neriberto
          last edited by

          VPN was site-to-site, After some errors I just do some rules that deny all.

          right now I can´t post the rules, lab are full of machines to fix

          after I will get some screenshoots… tks by now

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

            Ok just for example and test I did a simple test into my network.

            So as you can see openvpn rules before, and can ping 192.168.1.252 on my home network, Im connected to my network via openvpn roadwarrior from work currently.

            I then created a rule to block icmp to 192.168.1.252 - and see it is blocked, but I can still ping a different IP on my home network.

            I would assume you just have some rules not setup correctly.

            openvpn-rulebefore.jpg
            openvpn-rulebefore.jpg_thumb
            openvpn-blockicmp.jpg
            openvpn-blockicmp.jpg_thumb

            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
            • N
              neriberto
              last edited by

              by the theme in your screenshot I assume that you are using pfsense 1.*, Am I right?

              Well, I said it, because I am testing the pfsense 2.0 RC2, in the last year I had configured many pfsense with openvpn and worked fine.

              Well, unhappy I can´t try right now, but I´ll try later again and will post here the results

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

                There are many themes, you guessed wrong. Im on

                2.0-RC2-IPv6 (i386)
                built on Wed May 11 21:12:02 EDT 2011

                And actually ran a playback gitsync this morning against the ipv6 repository so pretty much as bleeding edge as you can be on the 2.0 code.

                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
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  Any time you change firewall rules to be more restrictive, such as by inserting a block rule, you need to reset the states. Either globally for everyone, by IP for that client, or by waiting for the old states to expire.

                  Reset the states between every test, and be careful of the rule ordering and constructions. The examples posted in this thread are a good example to go by, and they obviously work.

                  If you need help properly crafting rules, show screenshots of your OpenVPN rules tab and give details on what you expect to be blocked and what you expect to pass based on that.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • N
                    neriberto
                    last edited by

                    Hi, I recreated the scene in virtual machines and got the same result, but reading this document (http://doc.pfsense.org/index.php/Reset_States) understand that: when a new rule is applied, the state of the firewall is not automatically cleared to not harm any important connection at that time.

                    Doing some more testing I realized that with the HTTP connections do not need to reset the states, I can delete one by one under Diagnostics -> States, but not the same thing happens if I'm running a ping in a terminal of a machine.

                    Thanks by now. ;D

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