Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.