[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

iptables (mi masquerading ha dejado de funcionar), alguien me dice que esta mal?



A ver, os explico, tengo un router en modo bridge, asi que tengo la máquina Linux con 2 tarjetas de red haciendo de router, pero el caso es que no me funciona el masquerading.

Aqui os pego el contenido de /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet static
        address 192.168.0.3
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
auto ppp0
iface ppp0 inet ppp
provider dsl-provider

i aqui os pego el el script para que funcione el masquerading:


echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
iptables --flush
iptables --table nat --flush
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

--
usuario GNU/Linux
Reply to: