Paulo - PD escreveu:
Ol� amigos estou com dificuldades de compartilhar a internet entre os
computadores do local onde trabalho. Tenho um servidor instalado somente
debian sarge, e nele tenho 2 placas de rede, na eth0 tenho o meu ip
valido, e na eth1 tenho o ip da rede interna 192.168.1.2
Vi v�rios tutorias na net e como compartilhar a net por regras de nat,
mas nenhum funcionou. Algu�m poderia me dar os pa�os do que tenho que
fazer para disponibilizar net, pois n�o deve ser somente regra de nat,
fico no aguardo abrigado.
# cat /etc/init.d/rc.firewall
#!/bin/bash
# recover IPs
ETH0IP=`ifconfig eth0 | grep "inet addr:" | sed 's/.*inet addr://' | cut -d ' '
-f 1`
ETH1IP=`ifconfig eth1 | grep "inet addr:" | sed 's/.*inet addr://' | cut -d ' '
-f 1`
# clean all possible old mess
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
# masquerading
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
--
.''`. Caio Abreu Ferreira
: :' : GNU/Linux Debian
`. `'` Linux Counter 327834
`- OpenPGP Key ID 0xCBF5FE74
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]