Yesterday I configured my Ubuntu 16.04 server as a router. The router works fine (all devices on my LAN can connect to the Internet through the Ubuntu router) and I even can ping to external IP address from within the server.

But since yesterday I can't use mutt and rclone anymore. I get this errors : rclone to Backblaze :

`Failed to create file system for "Backblaze_B2:xxx": failed to authorize account: failed to authenticate: Get https://api.backblazeb2.com/b2api/v1/b2_authorize_account: dial tcp: lookup api.backblazeb2.com on [::1]:53: read udp [::1]:39266->[::1]:53: read: connection refused`

Mutt :

sendmail: Cannot open smtp.gmail.com:587

The changes I made for the router setup :

1) I uncommented the "net.ipv4.ip_forward=1" and "net.ipv6.conf.all.forwarding=1" lines in /etc/sysctl.conf

2) I changed IP tables : (eno1 : NIC for connection to the Internet, eno 2 NIC for LAN)

iptables -t nat -A POSTROUTING -s -o eno1 -j MASQUERADE

iptables -A FORWARD -s -o eno1 -j ACCEPT

iptables -A FORWARD -d -m state --state ESTABLISHED,RELATED -i eno1 -j ACCEPT

3) I installed isc-dhcp-server with INTERFACES="eno2" in /etc/default/isc-dhcp-server and defined subnet with netmask in /etc/dhcp/dhcpd.conf

Here is the content of /etc/network/interfaces:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface or the LAN interface
auto eno2
iface eno2 inet static

# The WAN interface (connected to the modem of my internet service provider)
auto eno1
iface eno1 inet static

Could someone please tell me what's going wrong here ?

Any help will be much appreciated !

  • From the first error message it seems your DNS server is not reachable through IPv6 loopback. So it is probably not listening on it. – Patrick Mevzek May 18 '18 at 22:30
  • @Patrick, Thanks for your reply. The problem was indeed the fact that applications from within the server couldn't find a DNS server. When I add a dns-nameserver to eno1 (the WAN interface), the problem is solved. But why on earth can any device on eno2 (the LAN interface) find the DNS servers of my ISP, and the applications running on the server not ? – kvthie0 May 19 '18 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.