Network troubleshooting: Difference between revisions

From miki
Jump to navigation Jump to search
Line 34: Line 34:


So we must reconfigure exim4 to accept connection from any interface. Reconfigure exim4 and make sure that local interface field is empty:
So we must reconfigure exim4 to accept connection from any interface. Reconfigure exim4 and make sure that local interface field is empty:
<lang=bash>
<source lang=bash>
dpkg-reconfigure exim4-config
dpkg-reconfigure exim4-config
grep dc_local_interfaces /etc/exim4/update-exim4.conf.conf
grep dc_local_interfaces /etc/exim4/update-exim4.conf.conf
# dc_local_interfaces=''
# dc_local_interfaces=''
</lang=bash>
</source>


'''Note''': The <code>DNS fwd/rev</code> mismatch actually comes from a wrong {{file|/etc/hosts}} configuration. This file still contained the old host name:
'''Note''': The <code>DNS fwd/rev</code> mismatch actually comes from a wrong {{file|/etc/hosts}} configuration. This file still contained the old host name:

Revision as of 06:23, 8 June 2016

Troubleshooting network issues

  • Ping DNS server
8.8.8.8       Google DNS server
195.238.2.21  Belgacom DNS server
  • Ping gateway (see netroute)

Can't connect to SMTP server

I can connect to smtp server locally:

nc localhost 25
# 220 www.immie.org ESMTP Exim 4.84_2 Mon, 06 Jun 2016 20:28:47 +0200

But when using the IP address, it does not work:

nc -v -v www.immie.org 25
# DNS fwd/rev mismatch: www.immie.org != vps282013.ovh.net
# immie.org [91.134.134.85] 25 (smtp) : Connection refused
# sent 0, rcvd 0

The firewall is configured to accept connections though:

iptables -L|grep smtp
# ACCEPT     tcp  --  anywhere             anywhere             tcp multiport dports smtp,submission

But in fact, exim only listens to localhost interface:

netstat -lpn|grep 25
# tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      23236/exim4
# tcp6       0      0 ::1:25                  :::*                    LISTEN      23236/exim4

So we must reconfigure exim4 to accept connection from any interface. Reconfigure exim4 and make sure that local interface field is empty:

dpkg-reconfigure exim4-config
grep dc_local_interfaces /etc/exim4/update-exim4.conf.conf
# dc_local_interfaces=''

Note: The DNS fwd/rev mismatch actually comes from a wrong /etc/hosts configuration. This file still contained the old host name:

cat /etc/hosts
# 127.0.0.1       localhost
# 91.134.134.85   vps282013.ovh.net vps282013