renatospc
February 24th, 2010, 12:20 AM
I'm having a problem with my ubuntu server (9.04). I can't ping my gateway nor addresses outside my network, but I can ping other addresses in my network. I can't connect to the internet from it (tried sudo apt-get update) but I can ssh into the server and apache is working.
It was set behind two routers 192.168.0.1->192.168.1.1->server(192.168.1.200)) and it was working almost all right (I couldn't direct port 80 requests to the server). However, I had to change the first router and its IP so now I have 192.168.1.1->192.168.0.1->server. In order to configure the new static IP I've made changes to /etc/network/interfaces and /etc/resolv.conf. Now this files look like:
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.200
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-nameservers 192.168.0.1
#auto eth0
and:
domain lan
search lan
nameserver 192.168.1.1
I've tryed using 192.168.0.1 in nameserver, but it didn't worked either. My /etc/hosts looks like:
127.0.0.1 localhost
#127.0.1.1 sofis.lan sofis
192.168.0.200 sofis.lan sofis
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The outputs for ifconfig -a and route -n are:
renatospc@sofis:~$ ifconfig -a
eth0 Link encap:Ethernet Endereço de HW 00:40:d0:65:e3:59
inet end.: 192.168.0.200 Bcast:192.168.0.255 Masc:255.255.255.0
endereço inet6: fe80::240:d0ff:fe65:e359/64 Escopo:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Métrica:1
pacotes RX:642 erros:0 descartados:0 excesso:0 quadro:0
Pacotes TX:223 erros:0 descartados:0 excesso:0 portadora:0
colisões:0 txqueuelen:1000
RX bytes:167184 (167.1 KB) TX bytes:29796 (29.7 KB)
IRQ:11 Endereço de E/S:0x8800
lo Link encap:Loopback Local
inet end.: 127.0.0.1 Masc:255.0.0.0
endereço inet6: ::1/128 Escopo:Máquina
UP LOOPBACK RUNNING MTU:16436 Métrica:1
pacotes RX:14 erros:0 descartados:0 excesso:0 quadro:0
Pacotes TX:14 erros:0 descartados:0 excesso:0 portadora:0
colisões:0 txqueuelen:0
RX bytes:984 (984.0 B) TX bytes:984 (984.0 B)
renatospc@sofis:~$ route -n
Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
Well, I don't know if I've forgot to change some file (I've made the working configuration a long time ago) or what's happening. I would really appreciate some help. Sorry if I've posted too much information, but usually posts don't have enough information. I've already tried to stop the firewall (shorewall) but it didn't helped.
Thanks
It was set behind two routers 192.168.0.1->192.168.1.1->server(192.168.1.200)) and it was working almost all right (I couldn't direct port 80 requests to the server). However, I had to change the first router and its IP so now I have 192.168.1.1->192.168.0.1->server. In order to configure the new static IP I've made changes to /etc/network/interfaces and /etc/resolv.conf. Now this files look like:
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.200
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-nameservers 192.168.0.1
#auto eth0
and:
domain lan
search lan
nameserver 192.168.1.1
I've tryed using 192.168.0.1 in nameserver, but it didn't worked either. My /etc/hosts looks like:
127.0.0.1 localhost
#127.0.1.1 sofis.lan sofis
192.168.0.200 sofis.lan sofis
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The outputs for ifconfig -a and route -n are:
renatospc@sofis:~$ ifconfig -a
eth0 Link encap:Ethernet Endereço de HW 00:40:d0:65:e3:59
inet end.: 192.168.0.200 Bcast:192.168.0.255 Masc:255.255.255.0
endereço inet6: fe80::240:d0ff:fe65:e359/64 Escopo:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Métrica:1
pacotes RX:642 erros:0 descartados:0 excesso:0 quadro:0
Pacotes TX:223 erros:0 descartados:0 excesso:0 portadora:0
colisões:0 txqueuelen:1000
RX bytes:167184 (167.1 KB) TX bytes:29796 (29.7 KB)
IRQ:11 Endereço de E/S:0x8800
lo Link encap:Loopback Local
inet end.: 127.0.0.1 Masc:255.0.0.0
endereço inet6: ::1/128 Escopo:Máquina
UP LOOPBACK RUNNING MTU:16436 Métrica:1
pacotes RX:14 erros:0 descartados:0 excesso:0 quadro:0
Pacotes TX:14 erros:0 descartados:0 excesso:0 portadora:0
colisões:0 txqueuelen:0
RX bytes:984 (984.0 B) TX bytes:984 (984.0 B)
renatospc@sofis:~$ route -n
Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
Well, I don't know if I've forgot to change some file (I've made the working configuration a long time ago) or what's happening. I would really appreciate some help. Sorry if I've posted too much information, but usually posts don't have enough information. I've already tried to stop the firewall (shorewall) but it didn't helped.
Thanks