Last update at :2024-06-15,Edit by888u
Many times when you buy a VPS or independent server, you will find that the multiple IPs assigned by default are unavailable, or the project expansion requires adding multiple IPs. At this time, we need to manually modify and configure new multiple IPs for the server. Here we take the Debian operating system as an example to briefly describe the operation process, for reference only!
Open file for editing:
vi /etc/network/interfaces
Add IPv4, take adding 5 (/29) as an example:
auto lo
iface lo inet loopback
auto enp3
iface enp3 inet static
address 192.187.88.21/29 (your own IP segment)
gateway 192.187.88.20 (server’s gateway)
dns-nameservers 8.8.8.8 8.8.4.4 (DNS)
auto enp3:0
iface enp3:0 inet static
address 192.187.88.22/29
auto enp3:1
iface enp3:1 inet static
address 192.187.88.23/29
auto enp3:2
iface enp3:2 inet static
address 192.187.88.24/29
auto enp3:3
iface enp3:3 inet static
address 192.187.88.25/29
Add IPv6:
iface enp3 inet6 static
address 2604:2048:a:12a::2/64
gateway 2604:2048:a:12a::1
up ip addr add 2604:2048:a:12a::1024/64 dev enp3
up ip addr add 2604:2048:a:12a::1025/64 dev enp3
Pay attention to the network card name and gateway, don’t make a mistake;
IPv4 and IPv6 can be configured a lot, copy it and change the number (such as auto enp3:0).
Finally, restart the network:
systemctl restart networking
Actually, you can also search for it yourself:
How to assign multiple IP addresses to network adapter
Recommended site searches: Korean cheap servers, vps for ip, asp host, online server website, US host ranking, foreign free website server, server Hong Kong, domain name information, purchase of registered domain names, domain names and hosts,
发表评论