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

    Big problems with rules and some with openvpn

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    4 Posts 2 Posters 2.5k 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.
    • B
      Bio
      last edited by

      Hi, All!

      i installed pfsense to replace recently died freebsd server that was used for openvpn link with remote office.
      i spent 2 days to get it to work. and it seems that pfsense has very inadequate behaviour at least with openvpn enabled.
      maybe i missed something but i read many manuals and tried to configure everything from scratch few times.

      first found bug was with openvpn - routing from local lan to remote doesnt work at all. only from pfs box.
      it connects (as client), and even i can ping remote lan from pfs box, but not from local lan with allow any->any rules. i even added tun0 to opt1 interface and created "allow any" rule for it. i also tried with redirect-gateway option.
      i can only reach vpn interface address from local lan. correct routes were pushed by server (one for vpn address scope, and one for remote lan). and it began to work only after adding outgoing NAT for VPN interface. but i wanted just routing as it was on old server.

      the second bug is firewall rules. it is wierd. rules doesnt work as expected! sometimes they doesnt work at all until rebooting pfs box.
      for example, i disable "allow all" rule and create few rules for access to specific IPs and apply changes.
      i still can access everything. after reboot rules begin to work as expected.
      if i disable some rules and apply - nothing changes until reboot.
      but, rules to allow access often work right after applying, but to block or just disable doesnt.

      tun0 (as opt1) rules doesnt needed at all to access remote net. (even with enabled "Disable all auto-added VPN rules.")

      and btw, logging seems to work only for blocking rules. not for passing.

      thanx in advance for any advises

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        (You use the work "bug" very generous…. http://www.catb.org/~esr/faqs/smart-questions.html#id382249 )

        Since you had an OpenVPN server before: did you compare the config file on the pfSense with your old config file?
        How you describe it, you've set it up wrong.
        Since you're pushing, you're using a PKI for a site-to-site. Did you also add client specific options to add local routes pointing to the subnet on the other side?
        Generally i don't recommend to use a PKI for site-to-site setups. Shared Key setups are a lot easier to manage for routed scenarios.

        Did you always clear the state table after changing the rules?
        How you describe, is that you tested, changed the rule, did the same test again and it worked.
        This is how i would expect it, since you created states with the first test.

        Are you aware that rules only apply inbound on an interface and not outbound?

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • B
          Bio
          last edited by

          about bugs… i tried to follow manuals. and it does not work as expected.

          state tables. hm. probably this is root of the evil :)

          yes, setup is PKI. i dont have access to other side config. routes are pushed from the other side (pfs box is client) -
          openvpn[1211]: /sbin/ifconfig tun0 192.168.10.2 192.168.10.1 mtu 1500 netmask 255.255.255.255 up
          openvpn[1211]: /sbin/route add -net 192.168.10.0 192.168.10.1 255.255.255.0
          openvpn[1211]: /sbin/route add -net 192.168.12.0 192.168.10.1 255.255.255.0

          192.168.12.0 is remote network. i can ping it from pfs box.
          but from local network i can only ping 192.168.10.2 (tun0 of pfs box) even with redirect-gateway and allow any->any rules on lan and opt (tun0) interfaces.

          local subnet 192.168.11.0/24

          some rules were like outbound
          LAN:  192.168.12.0/24  -> local subnet allow
          otherwise packets were blocked.

          1 Reply Last reply Reply Quote 0
          • GruensFroeschliG
            GruensFroeschli
            last edited by

            setup is PKI.
            openvpn[1211]: /sbin/ifconfig tun0 192.168.10.2 192.168.10.1 mtu 1500 netmask 255.255.255.255 up

            That is not consistant.
            If you have a PKI you wouldn't see that.
            It should look something like that:

            /sbin/ifconfig tun0 10.0.55.6 pointopoint 10.0.55.5 mtu 1500

            We do what we must, because we can.

            Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

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