Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ch8-mget: Add iptables rules to workaround default DROP rules #105

Open
wants to merge 1 commit into
base: 1st-edition
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ch8/ch8-mget/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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