I have a program which writes packets (destination address 10.3.0.2
) to the TUN/TAP interface.
Network:
host1|tun0----eth1(10.3.0.1)|-------------------host2|eth1(10.3.0.2)|
Wireshark captures these packets from interface tun0
but they are not forwarded to interface eth1
.
Commands:
sysctl -w net.ipv4.ip_forward=1
sysctl -p
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A INPUT -i tap+ -j ACCEPT
iptables -A FORWARD -i tap+ -j ACCEPT
/etc/init.d/networking restart
/etc/init.d/openvpn restart