0

Im trying to make a router from Lubuntu pc. I have a 2 NICs, one is connected to ISP and second for Lan. Im following by this tutorial. Dhcp server is working fine, I get ip addresses, I can ping external IP, but I have problem with domain resolving. No one domain is pinging or accessible. What have I missed?
P.S. All my network parameters I get from my ISP by dhcp. I havent bind-dns server and I don`t need it. On pc which acts as router, everything works fine. Problem with dns forwarding to Lan pc.

All my testings I do on windows-lan desktop ipconfig /all shows:

   Connection-specific DNS Suffix  . : example.org
   Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
   Physical Address. . . . . . . . . : 74-D4-35-43-53-4B
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.1.10.100(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Saturday, March 18, 2017 09:01:34
   Lease Expires . . . . . . . . . . : Saturday, March 18, 2017 09:16:34
   Default Gateway . . . . . . . . . : 10.1.10.1
   DHCP Server . . . . . . . . . . . : 10.1.10.1
   DNS Servers . . . . . . . . . . . : 10.1.10.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

sudo leafpad /etc/network/interfaces - ON MY ROUTER-PC SIDE. Commented gateway cause of Ive tried both with it and without, by default webmin didnt create it.

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo enp2s0 enp3s0
iface lo inet loopback


#WAN
iface enp3s0 inet dhcp

#LAN
iface enp2s0 inet static
    address 10.1.10.1
    netmask 255.255.255.0
    broadcast 10.1.10.255
    network 10.1.10.0
    #gateway 10.1.10.1
    dns-nameservers 10.1.10.1 78.158.0.65
    dns-domain 10.1.10.1
1
  • Is the issue with external DNS names such as www.google.com not resolving? if yes, try setting your gateway on your internal machines to your pc router ip address.leave the dns-nameservers blank, or specify the router pc ip address.
    – dajavex71
    Mar 18, 2017 at 0:43

1 Answer 1

0

If you followed the tutorial precisely. The problem is related to resolving domain names such as www.google.com properly from your lan side devices.

First, depending if internal machines are linux desktops, review the settings in network manager. Otherwise, if CLI devices, review the /etc/network/interfaces file.

It may look something like the following:

iface eth0 inet static
        address 192.168.85.220
        mask 255.255.255.0
        gateway {ipofpcrouter}
        dns-nameservers {ipofpcrouter}

Verify the dns-nameservers are pointing to the correct address, in your case the address of your pcrouter.

To verify the ip address of the router, drop to a terminal on that device and issue command:

ifconfig -a

Which should provide results as such, verify your mask is set correctly.

eth0  Link encap:Ethernet  HWaddr ac:16:2d:5d:63:7e
      inet addr:192.168.85.210  Bcast:192.168.85.255  Mask:255.255.255.0
      inet6 addr: fe80::ae16:2dff:fe5d:637e/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:4022 errors:0 dropped:0 overruns:0 frame:0
      TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:253666 (253.6 KB)  TX bytes:37170 (37.1 KB)

If the values do not match, modify the values on the client device to match. You may either issue ifdown/ifup to restart the interfaces, or disable/renable network manager, through the gui. Or what I prefer to do, restart the system.

For Network Manager: Check the IPv4 tab, and review the settings as described above.

Good Luck.

4
  • Lan-machine is windows, is there could be problem?
    – Kvach
    Mar 18, 2017 at 7:19
  • Check your IP configuration for your win station. Drop to a command prompt, issue ipconfig -a' , review the settings, check your gateway settings, if not accurate fix, if accurate, issue ipconfig /release' and 'ipconfig /renew'.
    – dajavex71
    Mar 18, 2017 at 12:38
  • I have reinstalled it from scratch, now I cannot access any web, but I see that domains are resolving: ping google.com Pinging google.com [195.122.30.45] with 32 bytes of data: Request timed out. Request timed out.
    – Kvach
    Mar 18, 2017 at 13:07
  • I dont know, but after iptables set up again, everything is working. I was pretty sure that iptables not necessarily if I allow all packets to flow. But anyway thx.
    – Kvach
    Mar 18, 2017 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .