What settings should be adjusted if additional IP address?

I want to add to the server another IP address.
on the server installed standard software, nginx, vsftpd, etc
what needs to be done in this case as to clearly separate the software with IP access. domain1-IP1, domain2-IP2
how it looks, just added another interface eth01 and so on?
April 4th 20 at 00:58
3 answers
April 4th 20 at 01:00
Approximately
root@host:~# cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 11.11.97.110
netmask 255.255.255.255
gateway 10.0.0.1
pointopoint 10.0.0.1

auto eth0:0
iface eth0:0 inet static
address 22.22.65.10
netmask 255.255.254.0
gateway 77.77.64.1
root@host:~#
And suddenly the author of the question Netplan - Suzanne_Mayert commented on April 4th 20 at 01:03
@Ebony, Then he will write about it. And to be honest I see very few cases to put the automation on the server.
More precisely even so, I almost always cut these things. - eduardo.Mayert commented on April 4th 20 at 01:06
April 4th 20 at 01:02
Usually additional IP broadcasts on the same network interface. ifconfig will show it as eth0:0, and utility is just the ip as a second ip on the interface.

In your program, just specify what ip to listen to.
For example with nginx:
listen <IP>:80;
and Iptables? - Eudora30 commented on April 4th 20 at 01:05
@jayde47, all the commands are similar, except when done setup for a particular address - ima_Fra commented on April 4th 20 at 01:08
@Gaston30if I now stand rules to certain ports, where I understand they operate at the interface, i.e., both IP? - Eudora30 commented on April 4th 20 at 01:11
@jayde47, Yes - ima_Fra commented on April 4th 20 at 01:14
April 4th 20 at 01:04
What OS, which version, the fact is that /etc/network/interfaces
this year goes to share and the portion of the distributions already refused it
debian 10 - Eudora30 commented on April 4th 20 at 01:07
yeah I'm about the same

Debian 9 a lot has changed in the setup and Troubleshooting of the network.
First, Debian 9 changed the system of naming network interfaces. If earlier, for example, Ethernet interface names were the following: eth0, eth1, eth2, etc. now used by these interfaces in the BIOS, and the PCI slots. This is called stateless persistent network interface names (names of persistent network interfaces stateless) i.e. the name can be enp0s3, or ens30, or for wlp3s0 wifi. If desired, you can rename the network interfaces to return to the old system, but that's material for another article.
Secondly, earlier for settings and network diagnostic utilities has been used from the net-tools package. When installing Debian this package is installed by default with the system. Now he's just present in repositories, but instead the default package iproute2. If desired, you can install an older package (net-tools) and to use the former utilities. And configure everything according to this article.
Thirdly, changed the system initialization – Debian switched to systemd. This means that the services must be restarted differently.

https://www.aitishnik.ru/nastroyka-seti-v-debian-9.html - dane.White commented on April 4th 20 at 01:10

Find more questions by tags HostingSystem administrationNetwork administration