Initial commit

This commit is contained in:
Folkert Kevelam 2025-06-22 20:49:24 +02:00
parent 1269351b03
commit efe6e3d69c

37
Mozart/fix_network.sh Normal file
View File

@ -0,0 +1,37 @@
#!/usr/bin/sh
nft delete chain ip nat post
nft delete chain ip nat pre
nft delete chain ip6 nat pre
nft delete chain ip6 nat post
nft delete table ip nat
nft delete table ip6 nat
nft add table ip nat
nft add chain ip nat post { type nat hook postrouting priority 0 \; }
nft add chain ip nat pre { type nat hook prerouting priority 0 \; }
nft add rule ip nat post ip saddr 10.0.3.1/24 oif enp1s0 masquerade
nft add table ip6 nat
nft add chain ip6 nat pre { type nat hook prerouting priority 0 \; }
nft add chain ip6 nat post { type nat hook postrouting priority 0 \; }
nft add rule ip6 nast post ip6 saddr fd96:d0e4:4979::/64 oif enp1s0 masquerade
ip -6 addr add fd96:d0e4:4979://64 dev lxcbr0
nft add rule ip nat pre ip daddr 116.203.17.85 tcp dport 10022 dnat to 10.0.3.1:22
nft add rule ip nat pre ip daddr 116.203.17.85 tcp dport 22 dnat to 10.0.3.10:22
nft add rule ip nat pre ip daddr 116.203.17.85 tcp dport 20022 dnat to 10.0.3.113:22
nft add rule ip nat pre ip daddr 116.203.17.85 tcp dport 30022 dnat to 10.0.3.17:22
nft add rule ip6 nat pre ip6 daddr 2a01:4f8:1c1b:89d2::2/64 tcp dport 10022 dnat to [fe80:9400:2ff:fefa:9ba6]:22
nft add rule ip6 nat pre ip6 daddr 2a01:4f8:1c1b:89d2::2/64 tcp dport 22 dnat to [fd96:d0e4:4979::1]:22
nft add rule ip6 nat pre ip6 daddr 2a01:4f8:1c1b:89d2::2/64 tcp dport 20022 dnat to [fd96:d0e4:4979::2]:22
nft add rule ip6 nat pre ip6 daddr 2a01:4f8:1c1b:89d2::2/64 tcp dport 30022 dnat to [fd96:d0e4:4979::3]:22
for i in /proc/sys/net/ipv6/conf/*; do
echo 1 > $i/forwarding
done