1

I want to reset all my networking files to default. The files include /etc/hosts, /etc/network/interfaces, /etc/resolv.conf, and more. How can I do that without re installing?

/etc/hosts

127.0.0.1     localhost
::1           localhost

/etc/resolv.conf

nameserver 192.168.1.1

/etc/network/interfaces

##Local Loopback

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.24
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 
8
  • Ooh, not easy... I ended up reinstalling to get it all working again...
    – Tim
    Jul 9, 2014 at 16:12
  • Could you copy them off the live CD?
    – Tim
    Jul 9, 2014 at 16:13
  • How were they changed ? /etc/hosts you would have manually edited or changed by setting a hostname perhaps. The others are normally automatically generated by networkmanager and can be reset with networkmanager.
    – Panther
    Jul 9, 2014 at 16:17
  • @bodhi.zazen I messed with them manually. I need it to reset because my lo interface does not work. Jul 9, 2014 at 16:24
  • 1
    Post the files you edited and we can likely fix it
    – Panther
    Jul 9, 2014 at 19:21

1 Answer 1

0
  1. /etc/hosts should remain as it is.
  2. Delete /etc/resolv.conf, make it a symlink to /run/resolvconf/resolv.conf and run resolvconf -u.
  3. Delete the entry for eth0 from /etc/network/interfaces.

It looks like you don't have any iptables rules to be worried about.

You must log in to answer this question.

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