#!/bin/sh
interfaz="eth0"
proxyfalso="192.168.18.10"

echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/$interfaz/send_redirects

iptables --flush
iptables --zero
iptables --delete-chain
iptables -F -t nat

iptables --append FORWARD --in-interface $interfaz --jump ACCEPT
iptables --table nat --append POSTROUTING --out-interface $interfaz --jump MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 8080 --jump DNAT --to-destination $proxyfalso
