ISP for my home…
parent
6c54b156e6
commit
22a1a23749
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
. ./lib.shs
|
||||||
|
. machines/$mach/opts.shs
|
||||||
|
|
||||||
|
nsenter --wdns=$nethorror_root $namespaces "$@"
|
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/false
|
||||||
|
|
||||||
|
namespaces="--net=./state/$mach/netns --mount=./state/$mach/mntns"
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
. ./lib.shs
|
||||||
|
|
||||||
|
ensure_started
|
||||||
|
attach machines/$mach/setup.sh
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# typically: bring up the networks
|
||||||
|
ip link set dev lo up
|
||||||
|
|
||||||
|
# uplink
|
||||||
|
# glue networks for both AFs
|
||||||
|
ip addr add 100.64.224.2/30 dev up_ve
|
||||||
|
ip addr add 2a01:4f8:c0c:36b8:ffe0::2/126 dev up_ve
|
||||||
|
# (cg)nat: TODO as we are (1) lazy and (2) wishing for public IPv4 address anyway
|
||||||
|
#nft add table ip nat
|
||||||
|
#nft add chain ip nat postrouting type nat hook postrouting priority srcnat
|
||||||
|
#nft add rule oifname \"up_ve\" ip saddr TODO masquerade
|
||||||
|
ip link set dev up_ve up
|
||||||
|
ip route add default via 100.64.224.1 dev up_ve
|
||||||
|
ip route add default via 2a01:4f8:c0c:36b8:ffe0::1 dev up_ve
|
||||||
|
|
||||||
|
# network to my home
|
||||||
|
# TODO: make this PPP(oE) in the future?
|
||||||
|
# It's silly to think that I would be the first customer, but the IP addresses do not care :-P
|
||||||
|
ip addr add 100.64.225.1/30 dev home_ve
|
||||||
|
ip addr add 2a01:4f8:c0c:36b8:ffe1::1/126 dev home_ve
|
||||||
|
ip link set dev home_ve up
|
||||||
|
# low-key delegated prefix :-P
|
||||||
|
ip route add 2a01:4f8:c0c:36b8:ffe1::/80 via 2a01:4f8:c0c:36b8:ffe1::2 dev home_ve
|
||||||
|
# TODO: DHCPv6 or IPv6CP
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
. ./lib.shs
|
||||||
|
. machines/$mach/opts.shs
|
||||||
|
|
||||||
|
setup_statedir
|
||||||
|
|
||||||
|
unshare $namespaces /bin/true # just create the namespaces
|
||||||
|
|
||||||
|
veth_to_bridge up_ve homeisp_up
|
||||||
|
veth_to_bridge home_ve home_up
|
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
. ./lib.shs
|
||||||
|
make_bridge
|
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
. ./lib.shs
|
||||||
|
make_bridge
|
Loading…
Reference in New Issue