

Sudo iptables -I FORWARD 1 -i wlan0 -o tun0-00 -j ACCEPT Sudo iptables -I FORWARD 1 -i tun0-00 -o wlan0 -m state -state RELATED,ESTABLISHED -j ACCEPT Used the -I flag to insert my rules: sudo iptables -t nat -I POSTROUTING 1 -o tun0-00 -j MASQUERADE I want to send all my traffic through the tunnel if the tunnel is open if not, I'm good with it using eth0. The trouble is that eth0 stays up the original rule to forward traffic to eth0 still exists. Unfortunately I know that these iptables rules aren't complete.

Sudo iptables -A FORWARD -i wlan0 -o tun0-00 -j ACCEPT Sudo iptables -A FORWARD -i tun0-00 -o wlan0 -m state -state RELATED,ESTABLISHED -j ACCEPT Thinkin it goes something like this: sudo iptables -t nat -A POSTROUTING -o tun0-00 -j MASQUERADE I do want to send all of it, don't want anything leaking out into the host network. Now I want to set up the same rules except use interface tun0-00 and forward all my traffic through my vpn tunnel. Sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT Sudo iptables -A FORWARD -i eth0 -o wlan0 -m state -state RELATED,ESTABLISHED -j ACCEPT Works great! sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

I'm forwarding wlan0 to eth0 and NATing all my traffic.
#Gns3 linux duplicate packets tun0 mac#
On switches that display this behavior, it can be induced by clearing the MAC forwarding table (on most Cisco switches, the privileged command “clear mac address-table dynamic” will accomplish this).I've used the following guide to set up my raspberry pi as an access point: The duplicated packet behavior is switch dependent, some switches exhibit this, and some do not. Since the interfaces attached to the bond may occupy multiple ports on a single switch, when the switch (temporarily) floods the traffic to all ports, the bond device receives multiple copies of the same packet (one per slave device). Initially, the switch does not associate the MAC address in the packet with a particular switch port, and so it may send the traffic to all ports until its MAC forwarding table is updated.
#Gns3 linux duplicate packets tun0 update#
This is not due to an error in the bonding driver, rather, it is a side effect of how many switches update their MAC forwarding tables. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1234 errors:0 dropped:0 overruns:0 carrier:0 RX packets:1234 errors:0 dropped:0 overruns:0 frame:0 TX packets:2490 errors:0 dropped:0 overruns:0 carrier:0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
