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

    Routing traffic through OpenVPN

    OpenVPN
    2
    5
    2.3k
    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.
    • Y
      yolul
      last edited by

      Hello

      I was able to setup VPN on my pfSense box after reading several super helpful tutorials on the forums here. I can ping the computers behind my pfSense and share folders and all that. However i also want to route traffic through pfSense when i am on a public network. I added this line: push "redirect-gateway def1" to the custom options of the server, but loading pages failed. I could still ping the PCs on the LAN though. Reading a tutorial from somewhere else suggested adding this line (route 192.168.3.0 255.255.255.0) to the client config file but that also didn't work.

      local address is :192.168.3.1
      Address pool is:192.168.200.0/24

      LAN firewall rule is:

      *  LAN net  *  192.168.200.0/24  *  *      openVpn

      I will post my client config if it's needed.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • Y
        yolul
        last edited by

        I also added: push "dhcp-option DNS 208.67.222.222"
        Still not working.

        1 Reply Last reply Reply Quote 0
        • AhnHELA
          AhnHEL
          last edited by

          Try push "dhcp-option DNS 192.168.200.1"

          AhnHEL (Angel)

          1 Reply Last reply Reply Quote 0
          • Y
            yolul
            last edited by

            Ok i will try that as soon as i can. In a post i found OP(mihai) made changes to  Advanced Outbound NAT (AON), him and someone else then were able to route traffic trough vpn. However GruensFroeschli has suggested in one of the posts that adding  push "redirect-gateway def1" and push "dhcp-option DNS xxx.xx.xxx.xxx" should do the trick since that would make OpenVPN do all the necessary work behind the scenes. I only have one WAN interface and one LAN, nothing fancy.

            1 Reply Last reply Reply Quote 0
            • Y
              yolul
              last edited by

              Finally i got it to work :D

              I tried changing the DNS address to what you suggested but that didn't work. So i added a custom entry to Manual Outbound NAT rule generation (Advanced Outbound NAT (AON)) and that got it to work.

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