Sure. Just set up each tunnel on a separate port address. I have a box running half-a-dozen or more tunnels in both directions. They all use unique port numbers in the 20000-60000 range.
Whether you can route the traffic out to the Internet depends on whether you have a firewall enabled. One simple solution is to use rules like:
Code:
iptables -A INPUT -j ACCEPT -i tun0
iptables -A FORWARD -j ACCEPT -i tun0
iptables -A OUTPUT -j ACCEPT -o tun0
iptables -A INPUT -j ACCEPT -i tun1
iptables -A FORWARD -j ACCEPT -i tun1
iptables -A OUTPUT -j ACCEPT -o tun1
All these rules come before the MASQUERADE rule for outbound traffic.
Bookmarks