Re: [Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-11 Por tôpico Bruno Lima
Vamos com calma.
O problema do DNSMASQ é por que você está configurando errado suas placas de
rede.
Vamos por passos:
Servidor:
rede local eth0:
IP: 192.168.0.1
NETMASK: *255.255.255.0*

rede a cabo eth2:
Coloque DHCP é melhor :)

Clientes:
[1] IP: 192.168.0.6
Mask: *255.255.255.0*
Gateway: 192.168.0.1
DNS Preferencial: 192.168.0.1
ou DNS Preferencial: DNS do seu provedor de internet

Acho que só.
Volte desde do começo do tutorial e poste seus resultados :)


On 9/11/06, Ricardo Duarte <[EMAIL PROTECTED]> wrote:
>
> On 09/09/06, Bruno Lima <[EMAIL PROTECTED]> wrote:
> > http://www.ubuntuforums.org/showthread.php?t=91370
> > Melhor jeito de fazer impossivel :)
>
> Segui esse tutorial acima, mas não consegui fazer o dnsmasq funcionar.
>
> Ao tentar iniciar o serviço (Etapa 4):
> [EMAIL PROTECTED]:~# /etc/init.d/dnsmasq restart
> Restarting DNS forwarder and DHCP server: dnsmasqdnsmasq: failed to
> bind listening socket for 192.168.0.1: Address already in use (failed
> to start).
>
> Continuei com o tutorial, e agora já estou com a internet sendo
> roteada pelo servidor.
>
> Mas, no terminal configurado com os dados abaixo[1], não consigo
> acessar o servidor pelo host[2], somente pelo IP[3].
> ---
> [1] IP: 192.168.0.6
> Mask: 255.255.0.0
> Gateway: 192.168.0.1
> DNS1: 201.10.120.3
> DNS2: 201.10.120.2
> ---
> [2] C:\>ping zeus
> A solicitação ping não pôde encontrar o host zeus. Verifique o nome e
> tente novamente.
> ---
> [3] C:\>ping 192.168.0.1
> Disparando contra 192.168.0.1 com 32 bytes de dados:
> Resposta de 192.168.0.1: bytes=32 tempo<1ms TTL=64
> Resposta de 192.168.0.1: bytes=32 tempo<1ms TTL=64
> (..)
> ---
>
> Revisando as configurações do servidor:
> ---
> [EMAIL PROTECTED]:~# ifconfig
> eth0  Link encap:Ethernet  HWaddr 00:E0:7D:F8:F6:B8
>  inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
>  inet6 addr: fe80::2e0:7dff:fef8:f6b8/64 Scope:Link
>  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>  RX packets:3475 errors:0 dropped:0 overruns:0 frame:0
>  TX packets:2607 errors:0 dropped:0 overruns:0 carrier:0
>  collisions:0 txqueuelen:1000
>  RX bytes:740571 (723.2 KiB)  TX bytes:1899017 (1.8 MiB)
>  Interrupt:12 Base address:0xec00
>
> eth2  Link encap:Ethernet  HWaddr 00:30:4F:10:2A:77
>  inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
>  inet6 addr: fe80::230:4fff:fe10:2a77/64 Scope:Link
>  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>  RX packets:1792 errors:0 dropped:0 overruns:0 frame:0
>  TX packets:1596 errors:0 dropped:0 overruns:0 carrier:0
>  collisions:6 txqueuelen:1000
>  RX bytes:1674737 (1.5 MiB)  TX bytes:233658 (228.1 KiB)
>  Interrupt:11
>
> loLink encap:Local Loopback
>  inet addr:127.0.0.1  Mask:255.0.0.0
>  inet6 addr: ::1/128 Scope:Host
>  UP LOOPBACK RUNNING  MTU:16436  Metric:1
>  RX packets:872 errors:0 dropped:0 overruns:0 frame:0
>  TX packets:872 errors:0 dropped:0 overruns:0 carrier:0
>  collisions:0 txqueuelen:0
>  RX bytes:69479 (67.8 KiB)  TX bytes:69479 (67.8 KiB)
> ---
>
> Sendo que o cabo que vem do modem está na eth2 e o cabo ligado no hub
> está na eth0.
>
> A tabela de roteamento está assim:
> ---
> [EMAIL PROTECTED]:~# route -nv
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric RefUse
> Iface
> 192.168.1.0 0.0.0.0 255.255.255.0   U 0  00
> eth2
> 192.168.0.0 0.0.0.0 255.255.0.0 U 0  00
> eth0
> 0.0.0.0 192.168.1.1 0.0.0.0 UG0  00
> eth2
> ---
>
> Respondendo ao Patrick:
> IP do Modem: 192.168.1.1
> DNS das estações e do servidor:  201.10.120.3 e 201.10.120.2
>
> Alguma sugestão de como resolver o problema do dnsmasq e do terminal
> não conseguir resolver o host do servidor?
>
> PS. Muito obrigado a todos que estão acompanhando e dando as sugestões
> de como configurar meu servidor.
>
> --
> Ricardo Antonio Duarte
> [EMAIL PROTECTED]
> http://ricardoduarte.com/
>
> --
> ubuntu-br mailing list
> ubuntu-br@lists.ubuntu.com
> www.ubuntu-br.org
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
>



-- 
Bruno Seabra Mendoça Lima
UFMA - Universidade Federal do Maranhão
DEINF - Departamento de Informática
LAbMint - Laboratorio de Midias Interativas
Telefone: 3217-8239
-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br


Re: [Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-11 Por tôpico Ricardo Duarte
On 09/09/06, Bruno Lima <[EMAIL PROTECTED]> wrote:
> http://www.ubuntuforums.org/showthread.php?t=91370
> Melhor jeito de fazer impossivel :)

Segui esse tutorial acima, mas não consegui fazer o dnsmasq funcionar.

Ao tentar iniciar o serviço (Etapa 4):
[EMAIL PROTECTED]:~# /etc/init.d/dnsmasq restart
Restarting DNS forwarder and DHCP server: dnsmasqdnsmasq: failed to
bind listening socket for 192.168.0.1: Address already in use (failed
to start).

Continuei com o tutorial, e agora já estou com a internet sendo
roteada pelo servidor.

Mas, no terminal configurado com os dados abaixo[1], não consigo
acessar o servidor pelo host[2], somente pelo IP[3].
---
[1] IP: 192.168.0.6
Mask: 255.255.0.0
Gateway: 192.168.0.1
DNS1: 201.10.120.3
DNS2: 201.10.120.2
---
[2] C:\>ping zeus
A solicitação ping não pôde encontrar o host zeus. Verifique o nome e
tente novamente.
---
[3] C:\>ping 192.168.0.1
Disparando contra 192.168.0.1 com 32 bytes de dados:
Resposta de 192.168.0.1: bytes=32 tempo<1ms TTL=64
Resposta de 192.168.0.1: bytes=32 tempo<1ms TTL=64
(..)
---

Revisando as configurações do servidor:
---
[EMAIL PROTECTED]:~# ifconfig
eth0  Link encap:Ethernet  HWaddr 00:E0:7D:F8:F6:B8
  inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
  inet6 addr: fe80::2e0:7dff:fef8:f6b8/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:3475 errors:0 dropped:0 overruns:0 frame:0
  TX packets:2607 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:740571 (723.2 KiB)  TX bytes:1899017 (1.8 MiB)
  Interrupt:12 Base address:0xec00

eth2  Link encap:Ethernet  HWaddr 00:30:4F:10:2A:77
  inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
  inet6 addr: fe80::230:4fff:fe10:2a77/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:1792 errors:0 dropped:0 overruns:0 frame:0
  TX packets:1596 errors:0 dropped:0 overruns:0 carrier:0
  collisions:6 txqueuelen:1000
  RX bytes:1674737 (1.5 MiB)  TX bytes:233658 (228.1 KiB)
  Interrupt:11

loLink encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  inet6 addr: ::1/128 Scope:Host
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:872 errors:0 dropped:0 overruns:0 frame:0
  TX packets:872 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:69479 (67.8 KiB)  TX bytes:69479 (67.8 KiB)
---

Sendo que o cabo que vem do modem está na eth2 e o cabo ligado no hub
está na eth0.

A tabela de roteamento está assim:
---
[EMAIL PROTECTED]:~# route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric RefUse Iface
192.168.1.0 0.0.0.0 255.255.255.0   U 0  00 eth2
192.168.0.0 0.0.0.0 255.255.0.0 U 0  00 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG0  00 eth2
---

Respondendo ao Patrick:
IP do Modem: 192.168.1.1
DNS das estações e do servidor:  201.10.120.3 e 201.10.120.2

Alguma sugestão de como resolver o problema do dnsmasq e do terminal
não conseguir resolver o host do servidor?

PS. Muito obrigado a todos que estão acompanhando e dando as sugestões
de como configurar meu servidor.

-- 
Ricardo Antonio Duarte
[EMAIL PROTECTED]
http://ricardoduarte.com/

-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br


Re: [Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-11 Por tôpico Ricardo Duarte
Ainda não resolvi. Hoje depois das 18h vou parar o servidor e tentar
essas sugestões.

Quando terminar publico as minhas experiências no Wiki.

-- 
Ricardo Antonio Duarte
[EMAIL PROTECTED]
http://ricardoduarte.com/

On 09/09/06, Raphael Menezes <[EMAIL PROTECTED]> wrote:
> Resolveu, Ricardo?!

-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br


Re: [Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-09 Por tôpico Bruno Lima
http://www.ubuntuforums.org/showthread.php?t=91370
Melhor jeito de fazer impossivel :)


On 9/9/06, Raphael Menezes <[EMAIL PROTECTED]> wrote:
>
> Resolveu, Ricardo?!
> On 9/6/06, hexa <[EMAIL PROTECTED]> wrote:
> >
> >
> > só configure 1 gateway... o da eth0
> >
> > talvez tenha faltado a regra de mascaramento no iptables
> >
> > iptables -t nat -A POSTROUTING -j MASQUERADE
> >
> >
> > faca os testes com sua firewall desabilitada
> >
> > se nao der certo,
> >
> > qual o ip do modem?
> > qual dns esta usando no server e nas maquinas?
> >
> > vlw
> >
> > Em Terça 05 Setembro 2006 20:27, Ricardo Duarte escreveu:
> > > Tentei fazer isso que você falou e não consegui.
> > >
> > > Qual será o gateway do eth1?
> > >
> > > O /proc/sys/net/ipv4/ip_forward já estava com o valor 1.
> > >
> > > Segue abaixo o meu /etc/network/interfaces
> > > --
> > > [EMAIL PROTECTED]:~# cat /etc/network/interfaces
> > > # The loopback network interface
> > > auto lo
> > > iface lo inet loopback
> > >
> > > # The primary network interface
> > > auto eth0
> > > iface eth0 inet static
> > > address 192.168.1.2
> > > netmask 255.255.255.0
> > > network 192.168.1.0
> > > broadcast 192.168.1.255
> > > gateway 192.168.1.1
> > >
> > > # The secundary network interface
> > > auto eth1
> > > iface eth1 inet static
> > > address 192.168.0.1
> > > netmask 255.255.0.0
> > > network 192.168.0.0
> > > broadcast 192.168.0.255
> > > gateway 192.168.1.1
> > >
> > > --
> > > Ricardo Antonio Duarte
> > > [EMAIL PROTECTED]
> > > http://ricardoduarte.com/
> > >
> > > On 05/09/06, hexa <[EMAIL PROTECTED]> wrote:
> > > > coloque as duas interfaces em redes diferentes, por exemplo:
> > > >
> > > > eth0 na rede 192.168.1.0/24
> > > > eth1 na rede  192.168.0.0/24
> > > >
> > > > para ser mais claro,
> > > >
> > > > supondo que o ip do modem seja 192.168.1.1, configure a eth0 para o
> ip
> > > > 192.168.1.2 e faca com que o gateway desse server seja o modem
> > > >
> > > > supondo q sua rede interna seja 192.168.0.0/24 e que o ip
> 192.168.0.1
> > > > ainda nao esteja sendo usado... configure sua eth1 com o ip
> > 192.168.0.1
> > > >
> > > > habilite o roteamento (echo 1 > /proc/sys/net/ipv4/ip_forward)
> > > >
> > > > e faca com que o gateway de suas estacoes seja o server (192.168.0.1
> )
> > > >
> > > > vlw
> >
> > --
> > Patrick Silva Ximenes
> > GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
> > PSLMS - Projeto Software Livre MS
> >
> > ---
> >
> > --
> > Patrick Silva Ximenes
> > GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
> > PSLMS - Projeto Software Livre MS
> >
> > --
> > ubuntu-br mailing list
> > ubuntu-br@lists.ubuntu.com
> > www.ubuntu-br.org
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
> >
> --
> ubuntu-br mailing list
> ubuntu-br@lists.ubuntu.com
> www.ubuntu-br.org
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
>



-- 
Bruno Seabra Mendoça Lima
UFMA - Universidade Federal do Maranhão
DEINF - Departamento de Informática
LAbMint - Laboratorio de Midias Interativas
Telefone: 3217-8239
-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br


Re: [Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-09 Por tôpico Raphael Menezes
Resolveu, Ricardo?!
On 9/6/06, hexa <[EMAIL PROTECTED]> wrote:
>
>
> só configure 1 gateway... o da eth0
>
> talvez tenha faltado a regra de mascaramento no iptables
>
> iptables -t nat -A POSTROUTING -j MASQUERADE
>
>
> faca os testes com sua firewall desabilitada
>
> se nao der certo,
>
> qual o ip do modem?
> qual dns esta usando no server e nas maquinas?
>
> vlw
>
> Em Terça 05 Setembro 2006 20:27, Ricardo Duarte escreveu:
> > Tentei fazer isso que você falou e não consegui.
> >
> > Qual será o gateway do eth1?
> >
> > O /proc/sys/net/ipv4/ip_forward já estava com o valor 1.
> >
> > Segue abaixo o meu /etc/network/interfaces
> > --
> > [EMAIL PROTECTED]:~# cat /etc/network/interfaces
> > # The loopback network interface
> > auto lo
> > iface lo inet loopback
> >
> > # The primary network interface
> > auto eth0
> > iface eth0 inet static
> > address 192.168.1.2
> > netmask 255.255.255.0
> > network 192.168.1.0
> > broadcast 192.168.1.255
> > gateway 192.168.1.1
> >
> > # The secundary network interface
> > auto eth1
> > iface eth1 inet static
> > address 192.168.0.1
> > netmask 255.255.0.0
> > network 192.168.0.0
> > broadcast 192.168.0.255
> > gateway 192.168.1.1
> >
> > --
> > Ricardo Antonio Duarte
> > [EMAIL PROTECTED]
> > http://ricardoduarte.com/
> >
> > On 05/09/06, hexa <[EMAIL PROTECTED]> wrote:
> > > coloque as duas interfaces em redes diferentes, por exemplo:
> > >
> > > eth0 na rede 192.168.1.0/24
> > > eth1 na rede  192.168.0.0/24
> > >
> > > para ser mais claro,
> > >
> > > supondo que o ip do modem seja 192.168.1.1, configure a eth0 para o ip
> > > 192.168.1.2 e faca com que o gateway desse server seja o modem
> > >
> > > supondo q sua rede interna seja 192.168.0.0/24 e que o ip 192.168.0.1
> > > ainda nao esteja sendo usado... configure sua eth1 com o ip
> 192.168.0.1
> > >
> > > habilite o roteamento (echo 1 > /proc/sys/net/ipv4/ip_forward)
> > >
> > > e faca com que o gateway de suas estacoes seja o server (192.168.0.1)
> > >
> > > vlw
>
> --
> Patrick Silva Ximenes
> GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
> PSLMS - Projeto Software Livre MS
>
> ---
>
> --
> Patrick Silva Ximenes
> GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
> PSLMS - Projeto Software Livre MS
>
> --
> ubuntu-br mailing list
> ubuntu-br@lists.ubuntu.com
> www.ubuntu-br.org
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
>
-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br


[Ubuntu-BR] Fwd: Re: Configurando duas placas de rede para compartilhamento de internet

2006-09-06 Por tôpico hexa

só configure 1 gateway... o da eth0

talvez tenha faltado a regra de mascaramento no iptables

iptables -t nat -A POSTROUTING -j MASQUERADE


faca os testes com sua firewall desabilitada

se nao der certo,

qual o ip do modem?
qual dns esta usando no server e nas maquinas?

vlw

Em Terça 05 Setembro 2006 20:27, Ricardo Duarte escreveu:
> Tentei fazer isso que você falou e não consegui.
>
> Qual será o gateway do eth1?
>
> O /proc/sys/net/ipv4/ip_forward já estava com o valor 1.
>
> Segue abaixo o meu /etc/network/interfaces
> --
> [EMAIL PROTECTED]:~# cat /etc/network/interfaces
> # The loopback network interface
> auto lo
> iface lo inet loopback
>
> # The primary network interface
> auto eth0
> iface eth0 inet static
> address 192.168.1.2
> netmask 255.255.255.0
> network 192.168.1.0
> broadcast 192.168.1.255
> gateway 192.168.1.1
>
> # The secundary network interface
> auto eth1
> iface eth1 inet static
> address 192.168.0.1
> netmask 255.255.0.0
> network 192.168.0.0
> broadcast 192.168.0.255
> gateway 192.168.1.1
>
> --
> Ricardo Antonio Duarte
> [EMAIL PROTECTED]
> http://ricardoduarte.com/
>
> On 05/09/06, hexa <[EMAIL PROTECTED]> wrote:
> > coloque as duas interfaces em redes diferentes, por exemplo:
> >
> > eth0 na rede 192.168.1.0/24
> > eth1 na rede  192.168.0.0/24
> >
> > para ser mais claro,
> >
> > supondo que o ip do modem seja 192.168.1.1, configure a eth0 para o ip
> > 192.168.1.2 e faca com que o gateway desse server seja o modem
> >
> > supondo q sua rede interna seja 192.168.0.0/24 e que o ip 192.168.0.1
> > ainda nao esteja sendo usado... configure sua eth1 com o ip 192.168.0.1
> >
> > habilite o roteamento (echo 1 > /proc/sys/net/ipv4/ip_forward)
> >
> > e faca com que o gateway de suas estacoes seja o server (192.168.0.1)
> >
> > vlw

--
Patrick Silva Ximenes
GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
PSLMS - Projeto Software Livre MS

---

-- 
Patrick Silva Ximenes
GULMS - Grupo de Usuarios Linux MS ([EMAIL PROTECTED])
PSLMS - Projeto Software Livre MS

-- 
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
www.ubuntu-br.org
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br