0

I'm hoping some iptables or dd-wrt guru can help me here.

I'm basically trying to configure my network with an additional wireless virtual interface so that I have a separate SSID (wl1.1) that I can use for VPN traffic via openVPN enabling me to access my vpn connection just by switching wifi network.

I've a test dd-wrt router that I have configured at the moment and I'm able to connect to my openVPN server okay, however this is forwarding all traffic regardless of wireless interface over the VPN. I think I just need some iptables rules to forward all traffice from the virtual wireless interface (wl1.1) to my tun0 interface.

Anyone any ideas?

1 Answer 1

1

I'm assuming that you have the two wireless interfaces configured appropriately, with different DHCP ranges. Remove the redirect-gateway directive from your OpenVPN configuration so that it doesn't send all traffic via the VPN. Then setup policy routing to send traffic from the IP range for wl1.1 via the VPN.

Assuming that the IP range for wl1.1 is 192.168.1.0/24, and the internal IP of the remote VPN server is 10.8.0.1:

echo "100 vpn" >> /etc/iproute2/rt_tables
ip route add default via 10.8.0.1 table vpn
ip rule add from 192.168.1.0/24 lookup vpn

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .