From 67d32388ac054faec53e77b00884d78ed0d7d068 Mon Sep 17 00:00:00 2001 From: MarcioJales Date: Sun, 22 Jan 2023 18:59:10 -0300 Subject: [PATCH] [ch8-mget] Add 2 rules on iptables to make it work: https://github.com/smoltcp-rs/smoltcp#hosted-usage-examples --- ch8/ch8-mget/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ch8/ch8-mget/setup.sh b/ch8/ch8-mget/setup.sh index eb373120..002ce5ee 100644 --- a/ch8/ch8-mget/setup.sh +++ b/ch8/ch8-mget/setup.sh @@ -14,3 +14,7 @@ sudo ip -6 route add fe80::/64 dev tap-rust sudo ip -6 route add fdaa::/64 dev tap-rust sudo ip6tables -t nat -A POSTROUTING -s fdaa::/64 -j MASQUERADE sudo sysctl -w net.ipv6.conf.all.forwarding=1 + +# Some distros have a default policy of DROP. This allows the traffic. +sudo iptables -A FORWARD -i tap-rust -s 192.168.42.0/24 -j ACCEPT +sudo iptables -A FORWARD -o tap-rust -d 192.168.42.0/24 -j ACCEPT \ No newline at end of file