Instalação/configuração:
Eu tenho um servidor RHEL 8, rodando Asterisk 15.x, que possui 2 NICs. NMCLI é usado para rede
NIC0 (eno5np0) está na rede confiável e está configurado como IPv4 estático e NIC1 (ens1f0) está no lado não confiável como DHCP IPv4. Ambos estão UP, BROADCAST, RUNNING, MULTICAST
NIC0 é de onde eu acesso o servidor, é uma rede interna e tem um IP de 10.38.149.244/32 (GW é 10.38.149.241) NIC1 deve permitir acesso à internet (para chamadas SIP) e tem um IP de 10.0 .0,91 (GW é 10.0.0.1)
Status do firewall - inativo (morto) Status do SE Linux - desabilitado
Configurações da interface do servidor nº 1:
TYPE=Ethernet
DEVICE=eno5np0
UUID=77c33e7a-7dba-4785-b749-dc0883b46cef
ONBOOT=yes
IPADDR=10.38.149.244
NETMASK=255.255.255.240
GATEWAY=10.38.149.241
NM_CONTROLLED=yes
BOOTPROTO=none
DOMAIN=comcast.net
DNS1=69.252.80.80
DNS2=69.252.81.81
DEFROUTE=yes
USERCTL=no
IPV4_FAILURE_FATAL=yes
TYPE=Ethernet
BOOTPROTO=dhcp
NM_CONTROLLED=yes
PEERDNS=no
DEFROUTE=no
NAME=ens1f0
UUID=249b95f0-d490-4402-b654-43695317d738
DEVICE=ens1f0
ONBOOT=yes
PROXY_METHOD=none
BROWSER_ONLY=no
IPV4_FAILURE_FATAL=no
IPV6_DISABLED=yes
IPV6INIT=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
Tabela de roteamento IP do kernel:
Destino | Porta de entrada | Máscara Genética | Bandeiras | Métrica | Referência | Usar | Iface |
---|---|---|---|---|---|---|---|
0.0.0.0 | 10.38.149.241 | 0.0.0.0 | UG | 100 | 0 | 0 | eno5np0 |
10.0.0.0 | 0.0.0.0 | 255.255.255.0 | você | 101 | 0 | 0 | ens1f0 |
10.38.149.240 | 0.0.0.0 | 255.255.255.240 | você | 100 | 0 | 0 | eno5np0 |
Não tenho nenhuma tabela NFT/tabela IP configurada
Estou conectado por SSH à interface 10.38.149.244 (NIC0, também conhecido como eno5np0), tenho acesso sudo
Eu executo o seguinte comando para NIC0: sudo traceroute -i eno5np0 8.8.8.8 e obtenho um rastreamento completo e agradável para 8.8.8.8
Eu executo o seguinte comando para NIC1: sudo traceroute -i ens1f0 8.8.8.8 e atinge o tempo limite, nenhum pacote recebido
Não consigo fazer ping/traceroute para qualquer endereço IP através do NIC1 (sudo ping -I e sudo traceroute -i), exceto 10.0.0.1, que é o gateway. É quase como se não fosse o gateway, os pacotes não retornassem ao servidor para processamento?
Questão/Problema
Então, depois de tentar ping e traceroute e não receber resposta, abri uma segunda sessão SSH no servidor e fiz um tcpdump enquanto executava um ping para 8.8.8.8 pela interface NIC1 em minha primeira sessão SSH:
Despejo TCP
sudo tcpdump -vv --interface ens1f0 -c 10
dropped privs to tcpdump
tcpdump: listening on ens1f0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:21:09.450739 IP6 (flowlabel 0x9b9b7, hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::1256:11ff:fe86:6e92 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 180s, reachable time 0ms, retrans timer 0ms
rdnss option (25), length 40 (5): lifetime 180s, addr: device1.inetprovider.net addr: device2.inetprovider.net
0x0000: 0000 0000 00b4 2001 0558 feed 0000 0000
0x0010: 0000 0000 0001 2001 0558 feed 0000 0000
0x0020: 0000 0000 0002
prefix info option (3), length 32 (4): 2601:0:200:80::/64, Flags [onlink, auto], valid time 300s, pref. time 300s
0x0000: 40c0 0000 012c 0000 012c 0000 0000 2601
0x0010: 0000 0200 0080 0000 0000 0000 0000
route info option (24), length 24 (3): ::/0, pref=medium, lifetime=180s
0x0000: 0000 0000 00b4 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000
source link-address option (1), length 8 (1): 10:56:11:86:6e:92
0x0000: 1056 1186 6e92
15:21:10.415419 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has dns.google tell 10.0.0.91, length 28
15:21:11.439570 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has dns.google tell 10.0.0.91, length 28
15:21:12.453262 IP6 (flowlabel 0x9b9b7, hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::1256:11ff:fe86:6e92 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 180s, reachable time 0ms, retrans timer 0ms
rdnss option (25), length 40 (5): lifetime 180s, addr: device1.inetprovider.net addr: device2.inetprovider.net
0x0000: 0000 0000 00b4 2001 0558 feed 0000 0000
0x0010: 0000 0000 0001 2001 0558 feed 0000 0000
0x0020: 0000 0000 0002
prefix info option (3), length 32 (4): 2601:0:200:80::/64, Flags [onlink, auto], valid time 300s, pref. time 300s
0x0000: 40c0 0000 012c 0000 012c 0000 0000 2601
0x0010: 0000 0200 0080 0000 0000 0000 0000
route info option (24), length 24 (3): ::/0, pref=medium, lifetime=180s
0x0000: 0000 0000 00b4 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000
source link-address option (1), length 8 (1): 10:56:11:86:6e:92
0x0000: 1056 1186 6e92
15:21:12.463417 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has dns.google tell 10.0.0.91, length 28
15:21:13.487416 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has dns.google tell 10.0.0.91, length 28
15:21:13.546246 IP (tos 0x0, ttl 4, id 8382, offset 0, flags [DF], proto UDP (17), length 219)
169.254.100.1.50760 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 191
15:21:13.546273 IP (tos 0x0, ttl 4, id 8383, offset 0, flags [DF], proto UDP (17), length 223)
169.254.100.1.50760 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 195
15:21:13.546320 IP (tos 0x0, ttl 4, id 8384, offset 0, flags [DF], proto UDP (17), length 227)
169.254.100.1.50760 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 199
15:21:13.546419 IP (tos 0x0, ttl 4, id 8385, offset 0, flags [DF], proto UDP (17), length 220)
169.254.100.1.50759 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 192
10 packets captured
10 packets received by filter
0 packets dropped by kernel
Não estou entendendo por que, se o servidor está fazendo uma solicitação ARP, não estou obtendo resposta? O problema no meu servidor é não saber como responder ao NIC0 com minha solicitação de ping (onde estou conectado por SSH)? É o gateway que está sendo configurado incorretamente? Preciso configurar uma tabela NFT/tabela IP?
Estou familiarizado com como fazer isso no RHEL 6.x, mas não no RHEL 8 (a configuração usando rota IP e tabelas IP foi mais simples, eu acho?)
No final do dia (para uma visão mais ampla) - tenho clientes Softphone para se registrar no Asterisk PBX na rede interna/confiável que chega através de NIC0 (que funciona). Eles precisam fazer chamadas telefônicas para terminais na Internet, mas apenas pela NIC1 - e no momento não consigo nem fazer ping para qualquer local na Internet pela interface NIC1.
Qualquer ajuda/orientação seria muito apreciada neste momento - estou perdido e desesperado.
Edição/esclarecimento adicional: Eu tenho um servidor RHEL 6.x, com exatamente as mesmas conexões físicas e NICs em que funciona. Eu tentei usar o iptable e a tabela de roteamento deste Servidor nº 2 no Servidor nº 1 acima e não funcionou (eu sou inicializado quando ligo a interface novamente e tenho que reiniciar o dispositivo para limpar quaisquer alterações não salvas antes Posso voltar) Usei o iptables para a função de tradução nft apenas para sua informação. Conectei meu servidor nº 1 NIC1 à porta de acesso à Internet/modem em boas condições que o servidor nº 2 está usando e ainda não houve alterações.
Configurações da interface do servidor nº 2:
DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="da71293d-4351-481e-a794-bc5850e29391"
IPADDR=10.38.149.243
DNS1=10.168.241.223
DOMAIN=comcast.net
DEFROUTE=no
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
#HWADDR=00:1C:23:CF:BC:E3
HWADDR=00:1c:23:cf:bc:e3
NETMASK=255.255.255.240
USERCTL=no
PEERDNS=yes
GATEWAY=10.38.149.241
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:1c:23:cf:bc:e5
NM_CONTROLLED=yes
ONBOOT=yes
DEFROUTE=yes
TYPE=Ethernet
UUID="78bc69cb-80ca-41d1-af9c-66703eb952d5"
USERCTL=no
PEERDNS=yes
IPV6INIT=no
Tabela de roteamento do kernel no servidor nº 2
Destino | Porta de entrada | Máscara Genética | Bandeiras | Métrica | Referência | Usar | Iface |
---|---|---|---|---|---|---|---|
0.0.0.0 | 10.0.0.1 | 255.255.255.255 | ECA | 0 | 0 | 0 | eth1 |
10.38.149.240 | 0.0.0.0 | 255.255.255.240 | você | 0 | 0 | 0 | eth0 |
10.0.0.0 | 0.0.0.0 | 255.255.255.0 | você | 0 | 0 | 0 | eth1 |
10.0.0.0 | 10.38.149.241 | 255.0.0.0 | UG | 0 | 0 | 0 | eth0 |
0.0.0.0 | 10.0.0.1 | 0.0.0.0 | UG | 0 | 0 | 0 | eth1 |
iptables -L no servidor #2
Cadeia INPUT (política ACEITAR)
alvo | lucro | optar | fonte | destino | status? |
---|---|---|---|---|---|
DERRUBAR | todos | -- | c-67-164-235-175.devivce1.mi.inetprovider.net | em qualquer lugar | |
DERRUBAR | todos | -- | c-67-164-235-175.devivce1.mi.inetprovider.net | em qualquer lugar | |
ACEITAR | todos | -- | em qualquer lugar | em qualquer lugar | |
ACEITAR | todos | -- | em qualquer lugar | em qualquer lugar | estado RELACIONADO, ESTABELECIDO |
ACEITAR | tcp | -- | em qualquer lugar | em qualquer lugar | tcp dpt:ssh |
ACEITAR | UDP | -- | em qualquer lugar | em qualquer lugar | udp dpt:sip |
ACEITAR | UDP | -- | em qualquer lugar | em qualquer lugar | udp dpts:ndmp:dnp |
DERRUBAR | todos | -- | 106.0.0.0/8 | em qualquer lugar | |
DERRUBAR | todos | -- | 106.0.0.0/8 | em qualquer lugar | |
DERRUBAR | todos | -- | host-87-0-0-0.retail.blockeddomain.notus/8 | em qualquer lugar | |
DERRUBAR | todos | -- | 113.0.0.0/8 | em qualquer lugar | |
DERRUBAR | todos | -- | 117.0.0.0/8 | em qualquer lugar | |
DERRUBAR | todos | -- | p5b000000.dip0.blockeddomain.notus/8 | em qualquer lugar |
Cadeia FORWARD (política ACEITAR)
alvo | lucro | optar | fonte | destino |
---|---|---|---|---|
ACEITAR | todos | -- | em qualquer lugar | em qualquer lugar |
Cadeia OUTPUT (política ACEITAR)
alvo | lucro | optar | fonte | destino |
---|