Autor Tópico: compartilhamento de internet (ubuntu -> XP) [2 placas de rede]  (Lida 2068 vezes)

Offline salsa

  • Usuário Ubuntu
  • *
  • Mensagens: 61
    • Ver perfil
compartilhamento de internet (ubuntu -> XP) [2 placas de rede]
« Online: 03 de Setembro de 2006, 14:55 »
Seguinte galera, eu tava procurando ae como resolver o problema deu nao conseguir compartilhar a minha conexao com outro computador q roda XP e ae axei a solução....

POREM, estou tendo problemas com o script de inicialização..
bom... se eu executar os passos abaixo manualmente, no passo 5 ele pede para executar:

# dpkg-reconfigure ipmasq

ae ele entra numa tela onde eu apenas confirmo as opçoes e pronto... continuo o processo e minha internet funciona sem problemas...

porem se eu deixo esse script no /etc/rc.local
qndo ele inicia ele nao libera a internet...
soh se eu seguir os passos manualmente...
to axando q qndo ele executa esses passos ae q eu falei acima...
ele nao libera direito o processo...

alguem sabe como posso resolver isso pra deixar automatico?

valeu!!!
:p


Código: [Selecionar]
#############################
# Configuração para internet
#############################
#
#The following will explain how to share your Internet connection:
#
#Note: Type all the following commands in a root terminal, DO NOT use sudo.
#
#1. Start by configuring the network card that interfaces to the other computers #on you network:
#
ifconfig eth1 192.168.0.1
#
#where ethX is the network card and ip is your desired server ip address (Usually #192.168.0.1 is used)
#
#2. Then configure the NAT as follows:
#
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#
#where ethX is the network card that the Internet is coming from
#
echo 1 > /proc/sys/net/ipv4/ip_forward
#
#3. Install dnsmasq and ipmasq using apt-get:
#
# apt-get install dnsmasq ipmasq
#
#4. Restart dnsmasq:
#
/etc/init.d/dnsmasq restart
#
#5. Reconfigure ipmasq to start after networking has been started:
#
# dpkg-reconfigure ipmasq
#
#6. Repeat steps 1 and 2.
ifconfig eth1 192.168.0.1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#7. Add the line "net.ipv4.ip_forward = 1" to /etc/sysctl.conf
#
# gedit /etc/sysctl.conf
#
#8. Reboot. (Optional)
#
######################################
# Final da Configuração para internet
######################################