H. S. wrote:
Problem seems to be solved. In my iptables script, I am using rules
based on IP address of eth0. Now with vpn, my active device is tun0 and
the firewall script doesn't know anything about that yet.
Need to figure out how to do that dynamically. Maybe I can restart the
iptables script after tun0 is up and do ifconfig in the script to get
tun0's ipaddress as well and add it to the one of eth0, so that traffic
through tun0 has similar rules as that through eth0. Suggestions?
Just allow traffic in/out of your tun0 interface (the -i and -o options,
respectively). iptables won't care if the interface isn't up yet when you
specify the rules.
Adam