All pastes #493854 Raw Edit

Cobi

public shellscript v1 · immutable
·published 2007-05-17 23:48 UTC
rendered paste body
#!/bin/sh/sbin/iptables -t filter -F/sbin/iptables -t filter -X/sbin/iptables -t filter -P INPUT DROP/sbin/iptables -t filter -P FORWARD DROP/sbin/iptables -t filter -P OUTPUT ACCEPT/sbin/iptables -t filter -A INPUT -p TCP ! -i lo --dport 800 -j DROP/sbin/iptables -t filter -A INPUT -p TCP ! -i lo --dport 8118 -j DROP/sbin/iptables -t filter -A INPUT -p TCP ! -i lo --dport 9050 -j DROP/sbin/iptables -t filter -A INPUT -p TCP ! -i lo --dport 8123 -j DROP/sbin/iptables -t filter -A INPUT -p TCP ! -i lo --dport 8081 -j DROP/sbin/iptables -t filter -A INPUT -p UDP -i red --dport 137 -s 0/0 -j DROP/sbin/iptables -t filter -A INPUT -p UDP -i red --dport 138 -s 0/0 -j DROP/sbin/iptables -t filter -A INPUT -p UDP -i orange --dport 137 -s 0/0 -j DROP/sbin/iptables -t filter -A INPUT -p UDP -i orange --dport 138 -s 0/0 -j DROP/sbin/iptables -t filter -N ipblock/sbin/iptables -t filter -A INPUT -i red -j ipblock/sbin/iptables -t filter -A FORWARD -i red -j ipblock/sbin/iptables -t filter -N guardian/sbin/iptables -t filter -A INPUT -i red -j guardian/sbin/iptables -t filter -A FORWARD -i red -j guardian/sbin/iptables -t filter -N advnet/sbin/iptables -t filter -A INPUT -i red -j advnet/sbin/iptables -t filter -N portfw/sbin/iptables -t filter -A FORWARD  -j portfw/sbin/iptables -t filter -A INPUT  -j portfw/sbin/iptables -t filter -A INPUT -i lo -j ACCEPT/sbin/iptables -t filter -A INPUT -i green -j ACCEPT/sbin/iptables -t filter -A INPUT -i ppp0 -j ACCEPT/sbin/iptables -t filter -N block/sbin/iptables -t filter -A block -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A block -i green -j ACCEPT/sbin/iptables -t filter -A block -i ppp0 -j ACCEPT/sbin/iptables -t filter -A block -i tun0 -j ACCEPT/sbin/iptables -t filter -N xtaccess/sbin/iptables -t filter -A block  -j xtaccess/sbin/iptables -t filter -A block -p TCP --source-port 67 --destination-port 68 -i red -j ACCEPT/sbin/iptables -t filter -A block -p TCP --source-port 68 --destination-port 67 -i red -j ACCEPT/sbin/iptables -t filter -A block -p UDP --source-port 67 --destination-port 68 -i red -j ACCEPT/sbin/iptables -t filter -A block -p UDP --source-port 68 --destination-port 67 -i red -j ACCEPT/sbin/iptables -t filter -A block -i orange -p tcp --dport 16667 -j ACCEPT/sbin/iptables -t filter -A INPUT  -j block/sbin/iptables -t filter -A INPUT  -j LOG --log-prefix="INPUT: "/sbin/iptables -t filter -A INPUT  -j REJECT/sbin/iptables -t filter -A FORWARD -o red -m mac --mac-source 00:16:36:2F:9C:0C -j LOG/sbin/iptables -t filter -A FORWARD -o red -m mac --mac-source 00:16:36:2F:9C:0C -j REJECT/sbin/iptables -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -o red -j ACCEPT/sbin/iptables -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -i red -j ACCEPT/sbin/iptables -t filter -A FORWARD -i green -o green -j ACCEPT/sbin/iptables -t filter -A FORWARD -i orange -o orange -j ACCEPT/sbin/iptables -t filter -A FORWARD  -j portfw/sbin/iptables -t filter -N dmzholes/sbin/iptables -t filter -N wifiholes/sbin/iptables -t filter -A FORWARD -i orange -o green -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i orange -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i orange -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i green -o orange -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i green -o ppp0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i green -o tun0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i ppp0 -o orange -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i ppp0 -o green -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i ppp0 -o tun0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i tun0 -o orange -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i tun0 -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i tun0 -o green -m state --state ESTABLISHED,RELATED -j ACCEPT/sbin/iptables -t filter -A FORWARD -i orange -o green -j dmzholes/sbin/iptables -t filter -A FORWARD -i tun0 -o green -j wifiholes/sbin/iptables -t filter -A FORWARD  -j LOG/sbin/iptables -t filter -A FORWARD  -j REJECT/sbin/iptables -t nat -F/sbin/iptables -t nat -X/sbin/iptables -t nat -N squid/sbin/iptables -t nat -N jmpsquid/sbin/iptables -t nat -A jmpsquid -d 10.0.0.0/8 -j RETURN/sbin/iptables -t nat -A jmpsquid -d 172.16.0.0/12 -j RETURN/sbin/iptables -t nat -A jmpsquid -d 192.168.0.0/16 -j RETURN/sbin/iptables -t nat -A jmpsquid -s 192.168.2.160/27 -j RETURN/sbin/iptables -t nat -A jmpsquid -d 169.254.0.0/16 -j RETURN/sbin/iptables -t nat -A jmpsquid  -j squid/sbin/iptables -t nat -A PREROUTING -i green -j jmpsquid/sbin/iptables -t nat -A PREROUTING -i tun0 -j jmpsquid/sbin/iptables -t nat -A squid -p TCP --dport 80 -j REDIRECT --to-ports 8080/sbin/iptables -t nat -N imlog/sbin/iptables -t nat -A imlog -d 10.0.0.0/8 -j RETURN/sbin/iptables -t nat -A imlog -d 172.16.0.0/12 -j RETURN/sbin/iptables -t nat -A imlog -d 192.168.0.0/16 -j RETURN/sbin/iptables -t nat -A imlog -d 169.254.0.0/16 -j RETURN/sbin/iptables -t nat -A PREROUTING -i orange -s 192.168.0.151 -j imlog/sbin/iptables -t nat -A PREROUTING -i orange -s 192.168.0.152 -j imlog/sbin/iptables -t nat -A POSTROUTING -o red -j MASQUERADE/sbin/iptables -t nat -A POSTROUTING -o green -s 192.168.2.1/24 -j MASQUERADE/sbin/iptables -t nat -A POSTROUTING -o orange -s 192.168.0.1/24 -j MASQUERADE/sbin/iptables -t nat -N portfw_pre/sbin/iptables -t nat -N portfw_post/sbin/iptables -t nat -A PREROUTING  -j portfw_pre/sbin/iptables -t nat -A POSTROUTING  -j portfw_post/sbin/iptables -t filter -F dmzholes/sbin/iptables -t filter -A dmzholes -m state --state NEW -p udp -s 192.168.0.153 -d 192.168.2.1 --dport 53 -j ACCEPT/sbin/iptables -t filter -F wifiholes/sbin/iptables -t filter -A wifiholes -m state --state NEW -p tcp -s 192.168.182.0/24 -d sheetz.g.c --dport 22 -j ACCEPT/sbin/iptables -t filter -A wifiholes -m state --state NEW -p tcp -s 192.168.182.0/24 -d gali.g.c --dport 22 -j ACCEPT/sbin/iptables -t filter -A wifiholes -m state --state NEW -p tcp -s 192.168.182.0/24 -d shuttle.g.c --dport 22 -j ACCEPT/sbin/iptables -t filter -A wifiholes -m state --state NEW -p tcp -s 192.168.182.0/24 -d 192.168.2.144 --dport 5154 -j ACCEPT/sbin/iptables -t filter -A wifiholes -m state --state NEW -p udp -s 192.168.182.0/24 -d 192.168.2.144 --dport 5154 -j ACCEPT/sbin/iptables -t filter -F xtaccess/sbin/iptables -t filter -A xtaccess -i red -p tcp -s 0.0.0.0/0 --destination-port 113 -j ACCEPT/sbin/iptables -t filter -A xtaccess -i red -p 41 -s 0.0.0.0/0 -j ACCEPT/sbin/iptables -t filter -A xtaccess -i red -p tcp -s 0.0.0.0/0 --destination-port 22 -j ACCEPT/sbin/iptables -t filter -F advnet/sbin/iptables -t filter -A advnet -p IGMP -j DROP/sbin/iptables -t filter -F ipblock/sbin/iptables -t filter -A ipblock -s 83.184.130.25 -j DROP/sbin/iptables -t filter -A ipblock -s 62.75.193.116 -j DROP/sbin/iptables -t filter -A ipblock -s 85.18.23.137 -j DROP/sbin/iptables -t filter -A ipblock -s 69.36.3.48 -j DROP/sbin/iptables -t filter -A ipblock -s 80.68.246.78 -j DROP/sbin/iptables -t filter -A ipblock -s 68.178.232.99 -j DROP/sbin/iptables -t filter -A ipblock -s 61.188.39.28 -j DROP/sbin/iptables -t filter -A ipblock -s 80.11.141.9 -j DROP/sbin/iptables -t filter -A ipblock -s 218.200.216.58 -j DROP/sbin/iptables -t filter -A ipblock -s 200.127.118.193 -j DROP/sbin/iptables -t filter -A ipblock -s 66.36.251.230 -j DROP/sbin/iptables -t filter -A ipblock -s 24.13.112.2 -j DROP/sbin/iptables -t filter -A ipblock -s 24.161.46.91 -j DROP/sbin/iptables -t filter -A ipblock -s 61.142.250.46 -j DROP/sbin/iptables -t filter -A ipblock -s 59.37.66.7 -j DROP/sbin/iptables -t filter -A ipblock -s 61.144.60.2 -j DROP/sbin/iptables -t filter -A ipblock -s 84.1.64.18 -j DROP/sbin/iptables -t filter -A ipblock -s 207.96.235.186 -j DROP/sbin/iptables -t filter -A ipblock -s 203.75.227.120 -j DROP/sbin/iptables -t filter -A ipblock -s 38.118.212.78 -j DROP/sbin/iptables -t filter -A ipblock -s 71.248.115.119 -j DROP/sbin/iptables -t filter -A ipblock -s 212.116.128.10 -j DROP/sbin/iptables -t filter -A ipblock -s 212.50.10.144 -j DROP/sbin/iptables -t filter -A ipblock -s 219.145.107.162 -j DROP/sbin/iptables -t filter -A ipblock -s 218.75.24.230 -j DROP/sbin/iptables -t filter -A ipblock -s 80.96.109.231 -j DROP/sbin/iptables -t filter -A ipblock -s 69.28.181.35 -j DROP/sbin/iptables -t filter -A ipblock -s 66.28.104.6 -j DROP/sbin/iptables -t filter -A ipblock -s 195.230.0.60 -j DROP/sbin/iptables -t filter -A ipblock -s 216.74.152.11 -j DROP/sbin/iptables -t filter -A ipblock -s 66.94.237.85 -j DROP/sbin/iptables -t filter -A ipblock -s 66.94.237.84 -j DROP/sbin/iptables -t filter -A ipblock -s 66.94.237.71 -j DROP/sbin/iptables -t filter -A ipblock -s 66.94.237.73 -j DROP/sbin/iptables -t filter -A ipblock -s 61.150.108.21 -j DROP/sbin/iptables -t filter -A ipblock -s 81.52.202.113 -j DROP/sbin/iptables -t filter -A ipblock -s 81.52.250.97 -j DROP/sbin/iptables -t filter -A ipblock -s 208.122.223.4 -j DROP/sbin/iptables -t filter -A ipblock -s 63.111.69.15 -j DROP/sbin/iptables -t filter -A ipblock -s 61.136.205.158 -j DROP/sbin/iptables -t filter -A ipblock -s 222.81.80.14 -j DROP/sbin/iptables -t filter -A ipblock -s 216.90.171.3 -j DROP/sbin/iptables -t filter -A ipblock -s 61.178.180.226 -j DROP/sbin/iptables -t filter -A ipblock -s 208.11.75.3 -j DROP/sbin/iptables -t filter -A ipblock -s 62.153.203.202 -j DROP/sbin/iptables -t filter -A ipblock -s 221.232.160.115 -j DROP/sbin/iptables -t filter -A ipblock -s 82.147.153.162 -j DROP/sbin/iptables -t filter -A ipblock -s 194.12.254.114 -j DROP/sbin/iptables -t filter -A ipblock -s 222.218.156.5 -j DROP/sbin/iptables -t filter -A ipblock -s 61.153.13.53 -j DROP/sbin/iptables -t filter -A ipblock -s 59.44.219.6 -j DROP/sbin/iptables -t filter -A ipblock -s 219.153.2.168 -j DROP/sbin/iptables -t filter -A ipblock -s 61.233.91.120 -j DROP/sbin/iptables -t filter -F guardian/sbin/iptables -t filter -A guardian -s 64.34.176.112 -j DROP/sbin/iptables -t filter -F portfw/sbin/iptables -t nat -F portfw_pre/sbin/iptables -t nat -F portfw_post/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 6668 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6668 -j DNAT --to 192.168.0.102:6668/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 6688 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6688 -j DNAT --to 192.168.0.102:6688/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 7000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 7000 -j DNAT --to 192.168.0.102:7000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 7001 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 7001 -j DNAT --to 192.168.0.102:7001/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 7070 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 7070 -j DNAT --to 192.168.0.102:7070/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 7111 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 7111 -j DNAT --to 192.168.0.102:7111/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 10000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 10000 -j DNAT --to 192.168.0.102:10000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 20000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 20000 -j DNAT --to 192.168.0.102:20000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 25 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 25 -j DNAT --to 192.168.0.106:25/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 110 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 110 -j DNAT --to 192.168.0.106:110/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 143 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 143 -j DNAT --to 192.168.0.106:143/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 993 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 993 -j DNAT --to 192.168.0.106:993/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 106 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 106 -j DNAT --to 192.168.0.106:106/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 2222 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 2222 -j DNAT --to 192.168.0.106:2222/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 9200 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 9200 -j DNAT --to 192.168.0.106:9200/sbin/iptables -t filter -A portfw -i red -o orange -p 17 -s 0.0.0.0/0 -d 192.168.0.106 --dport 3653 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3653 -j DNAT --to 192.168.0.106:3653/sbin/iptables -t filter -A portfw -i red -o orange -p 17 -s 0.0.0.0/0 -d 192.168.0.106 --dport 4343 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 4343 -j DNAT --to 192.168.0.106:4343/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 6697 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6697 -j DNAT --to 192.168.0.102:6697/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 1512 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 1512 -j DNAT --to 192.168.0.106:1512/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.151 --dport 3306 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3306 -j DNAT --to 192.168.0.151:3306/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.151 --dport 2999 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 2999 -j DNAT --to 192.168.0.151:2999/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.152 --dport 22220:22230 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 22220:22230 -j DNAT --to 192.168.0.152/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.152 --dport 2528 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 2528 -j DNAT --to 192.168.0.152:2528/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.153 --dport 80 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 80 -j DNAT --to 192.168.0.153:80/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.153 --dport 443 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 443 -j DNAT --to 192.168.0.153:443/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.153 --dport 21 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 21 -j DNAT --to 192.168.0.153:21/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.153 --dport 53 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 53 -j DNAT --to 192.168.0.153:53/sbin/iptables -t filter -A portfw -i red -o orange -p 17 -s 0.0.0.0/0 -d 192.168.0.153 --dport 53 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 53 -j DNAT --to 192.168.0.153:53/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 10001 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 10001 -j DNAT --to 192.168.0.106:10001/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 10002 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 10002 -j DNAT --to 192.168.0.106:10002/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 6667 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6667 -j DNAT --to 192.168.0.102:6667/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 22 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 22 -j DNAT --to 192.168.0.102:22/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 98 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 98 -j DNAT --to 192.168.0.102:98/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 3310 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3310 -j DNAT --to 192.168.0.102:3310/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 3337 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3337 -j DNAT --to 192.168.0.102:3337/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 3338 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3338 -j DNAT --to 192.168.0.102:3338/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.201 --dport 6881:6889 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6881:6889 -j DNAT --to 192.168.0.201/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.102 --dport 5000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5000 -j DNAT --to 192.168.0.102:5000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.100 --dport 8602 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 8602 -j DNAT --to 192.168.0.100:8602/sbin/iptables -t filter -A portfw -i red -o orange -p 17 -s 0.0.0.0/0 -d 192.168.0.100 --dport 8602 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 8602 -j DNAT --to 192.168.0.100:8602/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.100 --dport 5900 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5900 -j DNAT --to 192.168.0.100:5900/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.100 --dport 5800 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5800 -j DNAT --to 192.168.0.100:5800/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.151 --dport 7566 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 7566 -j DNAT --to 192.168.0.151:7566/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.152 --dport 8000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 8000 -j DNAT --to 192.168.0.152:8000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.106 --dport 25 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 2525 -j DNAT --to 192.168.0.106:25/sbin/iptables -t filter -A portfw -i red -o orange -p 17 -s 0.0.0.0/0 -d 192.168.0.100 --dport 30000 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 30000 -j DNAT --to 192.168.0.100:30000/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.151 --dport 2999 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 23 -j DNAT --to 192.168.0.151:2999/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 5154 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5154 -j DNAT --to 192.168.2.144:5154/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.144 --dport 5154 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5154 -j DNAT --to 192.168.2.144:5154/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 6346 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6346 -j DNAT --to 192.168.2.144:6346/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.144 --dport 6346 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 6346 -j DNAT --to 192.168.2.144:6346/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 26299 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 26299 -j DNAT --to 192.168.2.144:26299/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.144 --dport 26299 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 26299 -j DNAT --to 192.168.2.144:26299/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 22 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 2121 -j DNAT --to 192.168.2.144:22/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 16003 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 16003 -j DNAT --to 192.168.2.144:16003/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.144 --dport 16003 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 16003 -j DNAT --to 192.168.2.144:16003/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.144 --dport 5901 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5901 -j DNAT --to 192.168.2.144:5901/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.149 --dport 88 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 88 -j DNAT --to 192.168.2.149:88/sbin/iptables -t filter -A portfw -i red -o green -p 17 -s 0.0.0.0/0 -d 192.168.2.149 --dport 3074 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 17 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3074 -j DNAT --to 192.168.2.149:3074/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.149 --dport 3074 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 3074 -j DNAT --to 192.168.2.149:3074/sbin/iptables -t filter -A portfw -i orange -o red -p all -s 0.0.0.0/0 -d 68.178.232.99 -j REJECT/sbin/iptables -t nat -A portfw_pre -p all -s 0.0.0.0/0 -d 68.178.232.99 -j DNAT --to 68.178.232.99/sbin/iptables -t filter -A portfw -i green -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.155 --dport 137:139 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 192.168.0.155 --dport 137:139 -j DNAT --to 192.168.0.155/sbin/iptables -t filter -A portfw -i green -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.155 --dport 445 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 192.168.0.155 --dport 445 -j DNAT --to 192.168.0.155:445/sbin/iptables -t filter -A portfw -i red -o green -p 6 -s 0.0.0.0/0 -d 192.168.2.201 --dport 54321 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 54321 -j DNAT --to 192.168.2.201:54321/sbin/iptables -t filter -A portfw -i red -o blue -p 6 -s 0.0.0.0/0 -d 192.168.4.201 --dport 5975 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5975 -j DNAT --to 192.168.4.201:5975/sbin/iptables -t filter -A portfw -i red -o blue -p 6 -s 0.0.0.0/0 -d 192.168.4.201 --dport 5976 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 5976 -j DNAT --to 192.168.4.201:5976/sbin/iptables -t filter -A portfw -i red -o orange -p 6 -s 0.0.0.0/0 -d 192.168.0.152 --dport 22224 -j ACCEPT/sbin/iptables -t nat -A portfw_pre -p 6 -s 0.0.0.0/0 -d 24.40.131.167 --dport 22224 -j DNAT --to 192.168.0.152:22224/sbin/iptables -t filter -A portfw -i orange -o red -p all -s 0.0.0.0/0 -d 192.168.100.1 -j REJECT/sbin/iptables -t nat -A portfw_pre -p all -s 0.0.0.0/0 -d 192.168.100.1 -j DNAT --to 192.168.100.1/sbin/iptables -t filter -A portfw -m state --state NEW -o red -j ACCEPT