Created
April 15, 2017 07:00
-
-
Save ford153focus/f96e9d241991b6765201690715789594 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 1 > /proc/sys/net/ipv4/ip_forward | |
echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf | |
iptables -t nat -F RSTOR | |
iptables -t nat -X RSTOR | |
iptables -t nat -N RSTOR | |
iptables -t nat -A RSTOR -p tcp --syn | |
iptables -t nat -A RSTOR -p tcp -j DNAT --to-destination 127.0.0.1:51329 | |
iptables -t nat -I OUTPUT 1 -p tcp -j RSTOR | |
iptables -t nat -I PREROUTING 1 -p tcp -d 195.82.146.0/24 -j RSTOR | |
iptables -t nat -F RSBEGET | |
iptables -t nat -X RSBEGET | |
iptables -t nat -N RSBEGET | |
iptables -t nat -A RSBEGET -p tcp --syn | |
iptables -t nat -A RSBEGET -p tcp -j DNAT --to-destination 127.0.0.1:51330 | |
iptables -t nat -I OUTPUT 1 -p tcp -j RSBEGET | |
iptables -t nat -I PREROUTING 1 -p tcp -d 195.82.146.0/24 -j RSBEGET | |
iptables -t nat -I PREROUTING 1 -p tcp -d 195.82.146.214 -j RSBEGET | |
iptables -t nat -I PREROUTING 1 -p tcp -d rutracker.org -j RSBEGET | |
#port forwarding | |
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8888 -j DNAT --to-destination 192.168.0.2 #port will be same - 8888 | |
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8888 -j DNAT --to-destination 192.168.0.2:8889 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment