Routing traffic through OpenVPN

  • 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 to the client config file but that also didn't work.

    local address is :
    Address pool is:

    LAN firewall rule is:

    *  LAN net  *  *  *      openVpn

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


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

  • Try push "dhcp-option DNS"

  • 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" 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.

  • 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.

Log in to reply