You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using linux (kde neon 5.27), add two lines in tap-rust creation script:
sudo iptables -A FORWARD -i tap-rust -s 192.168.42.100/24 -j ACCEPT
sudo iptables -A FORWARD -o tap-rust -d 192.168.42.100/24 -j ACCEPT
The whole file:
# to create TAP device
sudo \
ip tuntap \
add \
mode tap \
name tap-rust \
user $USER
# to confirm that tap-rust device was added
# ip tuntap list
# allocate IP address for TAP and tell system to forward packets to it
# establish a network device called tap-rust and activates it
sudo ip link set tap-rust up
# assigns the IP address 192.168.42.100 to the device
sudo ip addr add 192.168.42.100/24 dev tap-rust
# enables internet packets to reach the source IP address mask (-s 192.168.42.100/24)
# by appending a rule (-A POSTROUTING) that dynamically maps IP addresses to a device
# (-j MASQUERADE)
sudo iptables \
-t nat\
-A POSTROUTING \
-s 192.168.42.0/24 \
-j MASQUERADE
# instructs the kernel to enable IPv4 packet forwarding
sudo sysctl net.ipv4.ip_forward=1
# Some distros have a default policy of DROP. This allows the traffic.
sudo iptables -A FORWARD -i tap-rust -s 192.168.42.100/24 -j ACCEPT
sudo iptables -A FORWARD -o tap-rust -d 192.168.42.100/24 -j ACCEPT