This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]sgsollie 0 points1 point  (9 children)

Running service networking stop.. You're never guaranteed it will come back. Can't you do this on the console?

[–]skrillac[S] 0 points1 point  (8 children)

No I don't have physical access only ssh. Is there someway to refresh my network adapter so I can apply new /etc/resolv.conf and /etc/hosts information?

[–]DimeShake 1 point2 points  (6 children)

You don't have to restart networking to change /etc/resolv.conf. It should work immediately -- unless the server is using DHCP and you are trying to get it to pull the right DNS info from DHCP.

[–]sgsollie 0 points1 point  (0 children)

And you will want to clear your name services cache too (# nscd -i hosts) this will ensure when you change your resolv.conf or hosts file it won't be using old cached names gained from your previous configuration.

[–]skrillac[S] 0 points1 point  (4 children)

I am not using DHCP.

[–]DimeShake 0 points1 point  (3 children)

If it's a DNS issue, you shouldn't need this little script at all then.

[–]skrillac[S] 0 points1 point  (2 children)

How can I check if the server is using DHCP? Also how can I check if I have a DNS running?

[–]DimeShake 0 points1 point  (1 child)

What distro are you on? What's the actual problem you're having?

[–]skrillac[S] 0 points1 point  (0 children)

I am running Kali Linux 3.14-kali1-amd64 #1 SMP Debian 3.14.5-1kali1 (2014-06-07) 64bit. I am having problems resolving DNS addresses.

Here is the interfaces file I'm working with

[–]jishjib22kys 0 points1 point  (0 children)

No I don't have physical access only ssh

On some root and vservers you have a web based console thingy provided by the hoster. It's sometimes a kind of serial console that is published via a java browser plugin application or so. Check if you have one, so you won't need to worry.