Skip to content

Commit

Permalink
Fix host network configuration
Browse files Browse the repository at this point in the history
- don't set default route for the host
- fix setting ip forward for non privileged user
  • Loading branch information
Havner authored and jinbpark committed Dec 3, 2023
1 parent 7cce721 commit 0e744a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/configure_tap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ sudo ip addr flush dev ${ifname}

# Assign IP to armbr0
sudo ip addr add ${host_ip}/24 brd + dev armbr0
sudo ip route add default via ${gateway} dev armbr0

# 4. create a tap device
sudo ip tuntap add dev ARM${user} mode tap user ${user}
Expand All @@ -39,5 +38,5 @@ sudo ip link set ARM${user} master armbr0
sudo ip route add ${route_ip}/24 via ${fvp_ip}

# 5. add NAT functionality to properly interact with remote hosts
sudo echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -j MASQUERADE

0 comments on commit 0e744a3

Please sign in to comment.