Condivisione connessione internet

Davide Pesenti mrjive a mrjive.it
Mar 18 Gen 2005 09:02:49 CST


Il giorno mar, 18-01-2005 alle 12:10 +0100, Stefano - sardokan - Fanari
ha scritto:
> ifconfig eth0 192.168.0.1
> iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
> iptables -t nat -A POSTROUTING -d ! 192.168.0.0/24 -j MASQUERADE
> echo "1" > /proc/sys/net/ipv4/ip_forward

io farei cosi' (ammettendo che eth1 sia la scheda verso internet)

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

e lo metterei in /etc/network/interfaces

iface eth1 inet static
	address 11.22.11.22
	netmask 255.255.255.0
	gateway 11.22.11.1
	post-up iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
	post-up echo "1" > /proc/sys/net/ipv4/ip_forward

hth

	davide




More information about the ubuntu-it mailing list