Private network disable

April 30, 2019 265 views
Networking Ubuntu 18.04

Hey so i wanted to enable IPV6 and for some reason my brain went on to click on private network...

I've been looking for a way to access this file /etc/network/interfaces so that I can follow the instructions i found on how to delete eth1. The problem here is that nano /etc/network/interfaces doesnt work.. I have no idea how to get to the file i need.

This is what i'm trying to follow


In order to disable private networking from the command line, you need to edit the file /etc/network/interfaces It will look something like this:

# This file describes the network interfaces available on your
# system and how to activate them. For more information, see
# interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1 eth0
iface eth0 inet static
        address 95.85.37.158
        netmask 255.255.255.0
        gateway 95.85.37.1
        dns-nameservers 8.8.8.8 8.8.4.4
<^>iface eth1 inet static
        address 10.129.176.173
        netmask 255.255.0.0<^>

eth0 is the public interface, while eth1 is the private interface. Remove the sections about eth1 (highlighted above), and restart your droplet:

sudo shutdown -r now

1 Answer

when i do nano /etc/network/interfaces this is my contents.


# This file describes the network interfaces available on your
# system and how to activate them. For more information, see
# interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

source /etc/network/interfaces.d/*

and when i do nano /etc/network/interfaces.d/eth1 file is empty.

  • @zeryoags

    Configuring network depends on your distribution, can you please tell us what Linux distribution are you using? so we can help.

    as for the file /etc/network/interfaces.d/eth1 you can put your own content in it.

    auto eth1
    iface eth1 inet static
            address 10.129.176.173
            netmask 255.255.0.0
    

    Then using these commands to apply changes:

    sudo ifconfig eth1 down
    sudo ifconfig eth1 up
    

    Hope this helps, best of luck from DO community :)

Have another answer? Share your knowledge.