configurations/g20/rootfs/etc/ufw/before.rules

13 lines
565 B
Plaintext
Raw Normal View History

2023-04-24 21:15:34 +08:00
*nat
-A POSTROUTING -s 192.168.16.0/24 -o eth0 -j MASQUERADE
# to g18 gitea
-A PREROUTING -d 219.243.215.203 -p tcp --dport 443 -j DNAT --to 192.168.16.118:443
-A POSTROUTING -d 192.168.16.118 -p tcp --dport 443 -j SNAT --to 192.168.16.2
-A PREROUTING -d 219.243.215.203 -p tcp --dport 80 -j DNAT --to 192.168.16.118:80
-A POSTROUTING -d 192.168.16.118 -p tcp --dport 80 -j SNAT --to 192.168.16.2
-A PREROUTING -d 219.243.215.203 -p tcp --dport 22 -j DNAT --to 192.168.16.118:22
-A POSTROUTING -d 192.168.16.118 -p tcp --dport 22 -j SNAT --to 192.168.16.2
COMMIT