Terminologia

Terminologia

Terminologia

Eu tenho um servidor (vou me referir a ele como S1) rodando na nuvem, mas ele está se comportando mal. Também tenho outro servidor ( S2) rodando na mesma rede de nuvem, conectado por S1meio de uma rede separada ( eth1).

O servidor S1está conectado a essa rede interna por meio de eth1e diretamente conectado à web por meio de eth0.

S1está executando o Debian Jessie, atualizado de um Debian Wheezy limpo alterando /etc/apt/sources.list.

S2, que funciona perfeitamente, está rodando o Debian Wheezy. O mesmo Debian Wheezy limpo de S1antes da atualização.

Situação

  • Posso me conectar S1através de SSH de fora da rede
    • através da interface eth0.
  • Posso me conectar S1através de SSH de outro servidor ( S2)
    • através da interface eth1.
  • Posso me conectar S1ao outro servidor ( S2)
    • através da interface eth1.
  • Eu possonãoconectar-se S1ao mundo exterior
    • não atravéseth0
    • não atravéseth1
    • Não consigo fazer SSH para outros servidores; Não consigo fazer ping 8.8.8.8(enquantoS2 pode); Não consigo resolver hosts (usando 8.8.8.8in /etc/resolv.conf)

Problema e tentativas

Não tenho a mais estranha ideia de por que não consigo me conectar com o mundo exterior.

tabelas de ip

$ 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 

resolv.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

Solicitações 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

rota -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_forward

$ 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)

Responder1

De acordo com os resultados da solicitação ICMP, você tem problemas com o roteamento, mostre-nos route -n: cat /proc/sys/net/ipv4/ip_forwarde ifconfig -a.

Após a atualização: você não tem rota padrão na tabela de rotas, você pode adicioná-la por:, route add default gw x.x.x.xvocê deve comparar seus resultados com a máquina em funcionamento e procurar a linha contendo: 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

Comoqasdfdsaqapontou corretamente que não é uma solução persistente.

informação relacionada