forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiptables
28 lines (25 loc) · 1.55 KB
/
iptables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- local
sudo iptables -t nat -D OUTPUT -p tcp --dport 9021 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9022 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9023 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9024 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9025 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9026 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9027 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9028 -j DNAT --to 127.0.0.1:80
sudo iptables -t nat -D OUTPUT -p tcp --dport 9029 -j DNAT --to 127.0.0.1:80
-- prod
iptables -t nat -A PREROUTING -p tcp --dport 9021 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9022 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9023 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9024 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9025 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9026 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9027 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9028 -j DNAT --to 91.121.106.120:80
iptables -t nat -A PREROUTING -p tcp --dport 9029 -j DNAT --to 91.121.106.120:80
iptables-save > /etc/iptables.rules
/etc/network/interfaces
iface eth0 inet static
# stuff
pre-up iptables-restore < /etc/iptables.rules