Newbie - Trying to understand policy based routing (PBR)

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
jpny
OpenVpn Newbie
Posts: 5
Joined: Wed Aug 02, 2017 1:32 pm

Newbie - Trying to understand policy based routing (PBR)

Post by jpny » Wed Aug 02, 2017 1:53 pm

I'm a total newbie to OpenVPN but was able to piece together some code to get policy based routing on my DD-WRT router to route my VPN connection only for certain IPs.

Using this link as a guide I was able to get it working but have several questions about understanding the code and tweaking it

https://charleswilkinson.co.uk/2016/05/14/selective-routing-using-ddwrt-and-openvpn

1. Line 18 from the example causes an error (iptables v1.3.7: Unknown arg `--dport').
I have looked up the syntax of the command and it look OK to me. I see in the comments for that page someone refers to an error if the VPN connection hasn't been established yet, so I tried running that line manually after the VPN connected but it also errored out.

Im not sure that I want or need to send specific port data over the VPN. Am I understanding the function of this line correctly: Is what is happening 192.168.1.11 is ALWAYS routed through the VPN (on all ports) and ANY traffic on port 563, regardless of the IP routed through the VPN?

Is the fwmark line (line 12) only needed to catch the port tagged packets? I removed this section and all appears to still work for just IP specific routing (IP of all but 192.168.1.11 show ISP IP. .11 showing VPN IP. even with line 12 removed).

Post Reply