Interview Prep/Linux/Networking, DNS and firewalls

An application gets `connect: No route to host` to a server that is up and responds to ping from elsewhere.

IntermediateTroubleshootingNetworking, DNS and firewalls
Answer

Likely causes → The target's firewall rejects with icmp-host-prohibited (firewalld/iptables default REJECT), or ARP fails on the local segment.

Diagnose →

ip neigh show 10.0.1.20           # FAILED/INCOMPLETE = ARP problem
sudo tcpdump -ni eth0 'icmp or arp'
# on target
sudo firewall-cmd --list-all

Fix → Open the port on the target (firewall-cmd --add-port=8080/tcp --permanent && firewall-cmd --reload), or fix the L2 issue (VLAN, IP conflict).

Prevent → Remember: firewalld's reject message looks like a routing error.

All Linux questions Roadmap: Linux

More on Networking, DNS and firewalls