This commit is contained in:
iFargle 2023-12-07 00:16:48 +09:00
parent 42c4671816
commit 82fc2c0448

View file

@ -24,6 +24,25 @@
networking.firewall.extraCommands = '' networking.firewall.extraCommands = ''
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to-destination 10.100.0.2:25
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 25 -j SNAT --to-source 172.234.84.222
iptables -t nat -A PREROUTING -p tcp --dport 465 -j DNAT --to-destination 10.100.0.2:465
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 465 -j SNAT --to-source 172.234.84.222
iptables -t nat -A PREROUTING -p tcp --dport 587 -j DNAT --to-destination 10.100.0.2:587
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 587 -j SNAT --to-source 172.234.84.222
iptables -t nat -A PREROUTING -p tcp --dport 143 -j DNAT --to-destination 10.100.0.2:143
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 143 -j SNAT --to-source 172.234.84.222
iptables -t nat -A PREROUTING -p tcp --dport 993 -j DNAT --to-destination 10.100.0.2:993
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 993 -j SNAT --to-source 172.234.84.222
iptables -t nat -A PREROUTING -p tcp --dport 4190 -j DNAT --to-destination 10.100.0.2:4190
iptables -t nat -A POSTROUTING -p tcp -d 10.100.0.2 --dport 4190 -j SNAT --to-source 172.234.84.222
# TCP PORTS ################################################################################################## # TCP PORTS ##################################################################################################
# PORT 80 # PORT 80
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.100.0.2
@ -33,29 +52,29 @@
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 443 -j MASQUERADE iptables -t nat -A POSTROUTING -p tcp --dport 443 -j MASQUERADE
# PORT 25 # # PORT 25
iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 25 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 25 -j MASQUERADE
#
# PORT 465 # # PORT 465
iptables -t nat -A PREROUTING -p tcp --dport 465 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 465 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 465 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 465 -j MASQUERADE
#
# PORT 587 # # PORT 587
iptables -t nat -A PREROUTING -p tcp --dport 587 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 587 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 587 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 587 -j MASQUERADE
#
# PORT 143 # # PORT 143
iptables -t nat -A PREROUTING -p tcp --dport 143 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 143 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 143 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 143 -j MASQUERADE
#
# PORT 993 # # PORT 993
iptables -t nat -A PREROUTING -p tcp --dport 993 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 993 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 993 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 993 -j MASQUERADE
#
# PORT 4190 # # PORT 4190
iptables -t nat -A PREROUTING -p tcp --dport 4190 -j DNAT --to-destination 10.100.0.2 # iptables -t nat -A PREROUTING -p tcp --dport 4190 -j DNAT --to-destination 10.100.0.2
iptables -t nat -A POSTROUTING -p tcp --dport 4190 -j MASQUERADE # iptables -t nat -A POSTROUTING -p tcp --dport 4190 -j MASQUERADE
# PORT 42420 # PORT 42420
iptables -t nat -A PREROUTING -p tcp --dport 42420 -j DNAT --to-destination 10.100.0.2 iptables -t nat -A PREROUTING -p tcp --dport 42420 -j DNAT --to-destination 10.100.0.2