
Terminología
Tengo un servidor (me referiré a él como S1
) ejecutándose en la nube, pero no se comporta correctamente. También tengo otro servidor ( S2
) ejecutándose en la misma red en la nube, conectado a S1
través de una red separada ( eth1
).
El servidor S1
está conectado a esa red interna a través de eth1
y directamente a la web a través de eth0
.
S1
ejecuta Debian Jessie, actualizado desde un Debian Wheezy limpio cambiando /etc/apt/sources.list
.
S2
, que funciona perfectamente, ejecuta Debian Wheezy. El mismo Debian Wheezy limpio que S1
antes de la actualización.
Situación
- Puedo conectarme a
S1
través de SSH desde fuera de la red- a través de la interfaz
eth0
.
- a través de la interfaz
- Puedo conectarme
S1
a través de SSH desde otro servidor (S2
)- a través de la interfaz
eth1
.
- a través de la interfaz
- Puedo conectarme desde
S1
el otro servidor (S2
)- a través de la interfaz
eth1
.
- a través de la interfaz
- Puedonoconectarse desde
S1
el mundo exterior- no a través
eth0
- no a través
eth1
- No puedo enviar SSH a otros servidores; No puedo hacer ping
8.8.8.8
(mientrasS2
poder); No puedo resolver hosts (usando8.8.8.8
in/etc/resolv.conf
)
- no a través
Problema e intentos
No tengo la menor idea de por qué no puedo conectarme con el mundo exterior.
iptables
$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
resolver.conf
$ cat /etc/resolv.conf
nameserver 10.147.234.1
nameserver 8.8.8.8
nameserver 8.8.4.4
interfaces
$ cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The one directly connected to the web
auto eth0
iface eth0 inet dhcp
# The one connected to the internal network
auto eth1
iface eth1 inet dhcp
Solicitudes de ping
$ ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from (MY_IP) eth0: 56(84) bytes of data.
From (MY_IP) icmp_seq=1 Destination Host Unreachable
From (MY_IP) icmp_seq=2 Destination Host Unreachable
From (MY_IP) icmp_seq=3 Destination Host Unreachable
$ ping -I eth1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from (INTERNAL_IP) eth0: 56(84) bytes of data.
From (INTERNAL_IP) icmp_seq=1 Destination Host Unreachable
From (INTERNAL_IP) icmp_seq=2 Destination Host Unreachable
From (INTERNAL_IP) icmp_seq=3 Destination Host Unreachable
ruta -n
$ route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
10.147.234.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
(SUBNET_MY_IP (ends 0)) 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.169.254 85.222.226.153 255.255.255.255 UGH 0 0 0 eth0
ip_adelante
$ cat /proc/sys/net/ipv4/ip_forward
0
ifconfig-a
$ ifconfig -a
eth0 Link encap:Ethernet HWaddr fa:16:3e:d9:ab:b0
inet addr:(MY_IP) Bcast:(MY_IP_BUT_ENDS_WITH_255) Mask:255.255.255.0
inet6 addr: (MY_v6_IP) Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:75300 errors:0 dropped:0 overruns:0 frame:0
TX packets:689 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9905366 (9.4 MiB) TX bytes:86792 (84.7 KiB)
eth1 Link encap:Ethernet HWaddr fa:16:3e:2c:d7:80
inet addr:10.147.234.6 Bcast:10.147.234.255 Mask:255.255.255.0
inet6 addr: (MY_INTERNAL_6_IP) Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:177 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11626 (11.3 KiB) TX bytes:1346 (1.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:135 errors:0 dropped:0 overruns:0 frame:0
TX packets:135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22168 (21.6 KiB) TX bytes:22168 (21.6 KiB)
Respuesta1
Según los resultados de la solicitud ICMP, tiene problemas con el enrutamiento, muéstrenos
route -n
: cat /proc/sys/net/ipv4/ip_forward
y ifconfig -a
.
Después de la actualización: no tiene una ruta predeterminada en la tabla de rutas, puede agregarla mediante:
route add default gw x.x.x.x
, debe comparar sus resultados con la máquina en funcionamiento y buscar la fila que contenga:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 x.x.x.x 0.0.0.0 UG 1024 0 0 eth0
ComoqasdfdsaqSeñalado correctamente, no es una solución persistente.