From 68e3be1f591e40925b4c5c3f57aee8d4e260ebbf Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Tue, 13 Sep 2022 22:02:12 +0430 Subject: update --- ipv6/home_ns_bind.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 ipv6/home_ns_bind.sh (limited to 'ipv6/home_ns_bind.sh') diff --git a/ipv6/home_ns_bind.sh b/ipv6/home_ns_bind.sh new file mode 100755 index 0000000..3b52e11 --- /dev/null +++ b/ipv6/home_ns_bind.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +NS=home_ns +IF=wlp0s20f3 +PHY=phy0 + +sudo ip netns add ${NS} || true +sudo iw phy ${PHY} set netns "$(sudo ip netns exec home_ns sh -c 'sleep 1 >&- & echo "$!"')" +# sudo ip link set ${IF} netns ${NS} +sudo ip netns exec ${NS} ip link set ${IF} up +sudo ip netns exec ${NS} ip link set dev lo up +sudo ip netns exec ${NS} dhclient ${IF} + +ip netns exec ${NS} ping -4 9.9.9.9 +ip netns exec ${NS} ping -4 google.com +ip netns exec ${NS} curl -4 icanhazip.com -- cgit v1.2.3