SliTaz SliTaz Forum

You are not logged in.

#1 2013-01-26 20:02:48

vboxer
Member
Registered: 2013-01-26
Posts: 5

Name resolution on client machine - how to get to work?

Hello everyone.

I have two SliTaz virtual machines configured exactly as described here:

http://forum.slitaz.org/topic/internet-connection-sharing/page/2#post-1335 , which makes things simpler to explain wink

Don't think, their being virtual changes anything. Let's call them 'server' (the one w/ two adapters) and 'client'.

So, I set up IP forwarding on the server just as described in the post above and it kind of works, but something's still missing from the setup, b/c (I'm talking about the client machine here!) I can only ping internet hosts by IP address, but can't use their names. On the server everything works as intended - I mean, I can browse the web, ping the client etc. etc.

What gives?

Offline

#2 2013-01-26 21:56:10

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: Name resolution on client machine - how to get to work?

from the client can you ping 8.8.8.8 and 8.8.4.4 ?

Offline

#3 2013-01-27 03:57:24

vboxer
Member
Registered: 2013-01-26
Posts: 5

Re: Name resolution on client machine - how to get to work?

Yes on both counts.

Offline

#4 2013-01-27 04:45:45

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Name resolution on client machine - how to get to work?

If the client get's no response from a ping to www.slitaz.org you didn't setup udhcpcd for dynamic i.p. assignment on the server lan adapter the clients are connected to or your using static i.p. and didn't configure the clients adapter with DNS address.

tux@slitaz:~$ cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

Offline

#5 2013-01-27 05:37:30

vboxer
Member
Registered: 2013-01-26
Posts: 5

Re: Name resolution on client machine - how to get to work?

Indeed, there was "nameserver 192.168.0.1", and when I replaced that with 8.8...., everything worked like a charm. But one problem remains - the change doesn't stick, and after reboot, I still get 192.168.0.1 in that config file.

Offline

#6 2013-01-27 05:52:51

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: Name resolution on client machine - how to get to work?

are you on rolling or 4.0?

as Mojo said you probably are not getting your client address from dhcp.

recently rolling has been modified to default to a fixed address if a dhcp lease has not been obtained, so if your network is 192.168.0.0/24 your client ip has defaulted to 192.168.0.6 and all seems to work well, except for the wrong dns entry in /etc/resolv.conf.

check if server's udhcpcd is listening on the right eth interface, if you want to be sure to obtain an address olny trough dhcp change /etc/network.conf

[c]# Set IP address and netmask for a static IP.
IP="192.168.0.6"
NETMASK="255.255.255.0"[/c]
to an ip that does not belong to your network.

Offline

#7 2013-01-27 05:58:02

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Name resolution on client machine - how to get to work?

[c]# leafpad /etc/network.conf[/c]

[c]DNS_SERVER="8.8.8.8 8.8.4.4"[/c]

File Save File Quit

[c]# /etc/init.d/network.sh restart[/c]

Offline

#8 2013-01-27 05:59:02

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: Name resolution on client machine - how to get to work?

i was wrong with rolling mods, sorry. you probably are not using dhcp on client or server is misconfigured.

too much linux lately...

Offline

#9 2013-01-27 06:34:17

vboxer
Member
Registered: 2013-01-26
Posts: 5

Re: Name resolution on client machine - how to get to work?

Well, I did the 'network.conf' fix on the client - with mixed results.

I do see "nameserver 8.8.8.8.8.8.4.4" in /etc/resolv.conf after reboot, but DNS still isn't working properly. Should I split "8.8.8.8.8.8.4.4" into two addresses as in resolv.conf?

So, ernia's suggestions apply to the server, right? "An ip that does not belong to my network" - which one? the 10 or the 192?

Offline

#10 2013-01-27 07:31:38

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Name resolution on client machine - how to get to work?

Yes,it is two separate addresses with an empty space between them, 8.8.8.8 and 8.8.4.4:

/etc/network.conf

[c]DNS_SERVER="8.8.8.8   8.8.4.4"[/c]

Offline

#11 2013-01-27 08:07:19

vboxer
Member
Registered: 2013-01-26
Posts: 5

Re: Name resolution on client machine - how to get to work?

Yes!

Everything works as it should now.

Thank you very much guys for your patience, and apologies for my mix of network illiteracy and blindness.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]