Created
November 23, 2012 17:19
Revisions
-
guilherme created this gist
Nov 23, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ echo "Ativando: IP FORWARDING" echo echo "1" > /proc/sys/net/ipv4/ip_forward ################## ### PREROUTING ### ################## echo "Carregando: Regras PREROUTING" echo iptables -t nat -I PREROUTING 1 -d 5.1.1.1 -p tcp --dport 80 -j DNAT --to 5.1.1.2:80 # APACHE ################### ### POSTROUTING ### ################### echo "Carregando: Regras POSTROUTING" echo iptables -t nat -I POSTROUTING 1 -d 5.1.1.2 -p tcp --dport 80 -j SNAT --to 5.1.1.1 # APACHE