Change IP for the private network and add my own gateway

Hello all,

I am looking for some help to set up my network interface.

I have some issue due to reboot after changing configuration of my:

===

iface eth0 inet static address Y.Y.Y.Y/24 gateway Y.Y.Y.1 up ip addr add 192.168.1.10/17 dev eth0 label eth0:1 down ip addr del 192.168.1.10/17 dev eth0 label eth0:1

When i change the IP and reboot the "networking" daemon, it works perfectly.

But i notice that when i reboot the linode machine, it does a rollback to the old configuration…

Also i would like to know if someone know the way to add an gateway for my private network (which could be 192.168.1.254 for example).

Thank you for your help.

Regards,
Chris.

4 Replies

But i notice that when i reboot the linode machine, it does a rollback to the old configuration…

This is by design. Here are the comments in /etc/network/interfaces:

# Generated by Linode Network Helper
# Tue Jan 5 22:40:49 2021 UTC
#
# This file is automatically generated on each boot with your Linode's
# current network configuration. If you need to modify this file, please
# first disable the 'Auto-configure Networking' setting within your Linode's
# configuration profile:
# - https://cloud.linode.com/linodes/14981088/advanced
#
# For more information on Network Helper:
# - https://www.linode.com/docs/platform/network-helper
#
# A backup of the previous config is at /etc/network/.interfaces.linode-last
# A backup of the original config is at /etc/network/.interfaces.linode-orig
#
# /etc/network/interfaces

-- sw

Hi stevewi,

Thank you i find out where to desactivate the 'Auto-configure Networking' !

I have already read the documentation but i did not find out how to set a gateway for the private network.
Do you have any idea how could it be ?

Concerned part in /etc/network/interfaces

iface eth0 inet static address Y.Y.Y.Y/24 gateway Y.Y.Y.1 up ip addr add 192.168.1.10/17 dev eth0 label eth0:1 down ip addr del 192.168.1.10/17 dev eth0 label eth0:1

Regards,
Chris.

I have already read the documentation but i did not find out how to set a gateway for the private network. Can you give me the syntaxe of it please ?

I don't use a private network…so I don't know. What you ultimately use for your gateway is going to be dependent on where (which datacenter) your Linode runs…and that if you move your Linode to another datacenter, you'll have to change the gateway. Also, be aware, that the private network is not so private (unless you encrypt the traffic yourself):

https://www.linode.com/community/questions/11395/how-private-is-the-quotprivatequot-network

I'm afraid you'll have to wait for one of the Linodians to respond…

-- sw

Yes if someone else who know the solution that would be nice.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct