mediaserver: rework veth
This commit is contained in:
parent
75993ec17b
commit
e8c3ca2232
1 changed files with 4 additions and 5 deletions
|
@ -50,9 +50,8 @@
|
||||||
set -e
|
set -e
|
||||||
echo "Setting lo to up ..."
|
echo "Setting lo to up ..."
|
||||||
${iproute}/bin/ip -n wg link set lo up
|
${iproute}/bin/ip -n wg link set lo up
|
||||||
echo "Creating veth bridge ..."
|
echo "Creating veth network ..."
|
||||||
${iproute}/bin/ip link add name vethwghost0 type veth peer name vethwgns0
|
${iproute}/bin/ip link add name vethwghost0 type veth peer vethwgns0 netns wg
|
||||||
${iproute}/bin/ip link set vethwgns0 netns wg
|
|
||||||
${iproute}/bin/ip address add 192.168.42.1/24 dev vethwghost0
|
${iproute}/bin/ip address add 192.168.42.1/24 dev vethwghost0
|
||||||
${iproute}/bin/ip -n wg address add 192.168.42.2/24 dev vethwgns0
|
${iproute}/bin/ip -n wg address add 192.168.42.2/24 dev vethwgns0
|
||||||
${iproute}/bin/ip link set vethwghost0 up
|
${iproute}/bin/ip link set vethwghost0 up
|
||||||
|
@ -73,9 +72,9 @@
|
||||||
${iproute}/bin/ip -n wg route del default dev wg0
|
${iproute}/bin/ip -n wg route del default dev wg0
|
||||||
${iproute}/bin/ip -n wg -6 route del default dev wg0
|
${iproute}/bin/ip -n wg -6 route del default dev wg0
|
||||||
${iproute}/bin/ip -n wg link del wg0
|
${iproute}/bin/ip -n wg link del wg0
|
||||||
echo "Tearing down veth bridge ..."
|
echo "Tearing down veth network ..."
|
||||||
${iproute}/bin/ip -n wg link del vethwgns0
|
|
||||||
${iproute}/bin/ip link del vethwghost0
|
${iproute}/bin/ip link del vethwghost0
|
||||||
|
${iproute}/bin/ip -n wg link del vethwgns0
|
||||||
echo "Setting lo to down ..."
|
echo "Setting lo to down ..."
|
||||||
${iproute}/bin/ip -n wg link set lo down
|
${iproute}/bin/ip -n wg link set lo down
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
Loading…
Reference in a new issue