Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories


Add an additional IP address to your server

Ástþór IPÁstþór IP

1. Open the network configuration file (pico /etc/network/interfaces)

Check the name of your network interface. You should see a line similar to this one: “iface eth0 inet static”. In my case the name is eth0.

Add these lines to the end of the file:

auto eth0:1
iface eth0:1 inet static
address 192.168.1.3
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0

Replace eth0 by your network interface name. If you are adding multiple IP addresses to the same system, you can increase the number after “eth0:”.

2. Activate the new virtual network interface

ifup eth0:1

Comments 3
  • fantasio
    Posted on

    fantasio fantasio

    Author

    perfect . can i ask a question . How can we use with hosting at apache different web site ?


  • mrgkmn
    Posted on

    mrgkmn mrgkmn

    Author

    cant save file
    /etc/network/interfaces permission denied


  • aip
    Posted on

    aip aip

    Author

    @mrgkmn: Try “sudo pico /etc/network/interfaces”