This commit is contained in:
iFargle 2023-12-03 18:24:57 +09:00
parent 2e63307039
commit ccff88dceb

View file

@ -28,71 +28,71 @@
# TCP PORTS ################################################################################################## # TCP PORTS ##################################################################################################
# PORT 80 # PORT 80
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 80 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 80 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 80 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 80 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 443 # PORT 443
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 443 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 443 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 25 # PORT 25
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 25 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 25 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 25 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 25 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 465 # PORT 465
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 465 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 465 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 465 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 465 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 587 # PORT 587
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 587 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 587 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 587 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 587 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 143 # PORT 143
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 143 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 143 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 143 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 143 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 993 # PORT 993
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 993 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 993 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 993 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 993 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 4190 # PORT 4190
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 4190 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 4190 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 4190 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 4190 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 42420 # PORT 42420
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 42420 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 42420 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 42420 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 42420 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 25565 # PORT 25565
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 25565 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 25565 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 25565 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 25565 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 1443 # PORT 1443
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 1443 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 1443 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 1443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 1443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 4443 # PORT 4443
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 4443 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 4443 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 4443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 4443 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 5222 # PORT 5222
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5222 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5222 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5222 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5222 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 5347 # PORT 5347
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5347 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5347 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5347 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5347 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 5280 # PORT 5280
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5280 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 5280 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5280 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p tcp --dport 5280 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# UDP PORTS ################################################################################################## # UDP PORTS ##################################################################################################
# PORT 10000 # PORT 10000
iptables -t nat -A PREROUTING -i ens3 -p udp --dport 10000 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p udp --dport 10000 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p udp --dport 10000 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p udp --dport 10000 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
# PORT 3478 # PORT 3478
iptables -t nat -A PREROUTING -i ens3 -p udp --dport 3478 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -i ens3 -p udp --dport 3478 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -o wireguard0 -p udp --dport 3478 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 iptables -t nat -A POSTROUTING -o wireguard0 -p udp --dport 3478 -d 10.100.0.2 -j SNAT --to-source 10.100.0.1 -j MASQUERADE
''; '';
} }