Question

Private network disable

Posted April 30, 2019 891 views
NetworkingUbuntu 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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 :)

    • Hi. I have a Ubuntu 16.04 droplet. Private networks seems enabled on DO console and private network IP address is displayed but the server is not configured properly. Per your advice above, I put the below content in /etc/network/interfaces.d/eth1

      auto eth1
      iface eth1 inet static
      address 10.133.7.47
      netmask 255.255.0.0

      Then I ran ifconfig eth1 down & ifconfig eth1 up but I still don’t see the corrent IP address when I run ifconfig eth1:

      eth1 Link encap:Ethernet HWaddr c6:9d:9d:10:c2:44

      inet6 addr: fe80::c49d:9dff:fe10:c244/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:45 errors:0 dropped:0 overruns:0 frame:0
      TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:3038 (3.0 KB) TX bytes:2522 (2.5 KB)

      Do you have any further advice on how to proceed?

Submit an Answer