01-30-2012, 01:35 AM
Once you have installed a brand new Linux distro on your machine, you might want to connect to internet using the static ip address provided by your ISP. This configuration will work on Debian based linux machines or the debian variants like Ubuntu, Mint Linux and others.
As a root user, edit your /etc/network/interfaces file.
nano /etc/network/interfaces
Change From DHCP TO Static IP On Debian
Edit the /etc/network/interfaces file. Note, use the ip addresses specific to your network instead of just copying pasting from below.
When you are finished your file should look like the following:
Once done, you might want to restart your networking service and up the interface by using the commands below..
As a root user, edit your /etc/network/interfaces file.
nano /etc/network/interfaces
Change From DHCP TO Static IP On Debian
Edit the /etc/network/interfaces file. Note, use the ip addresses specific to your network instead of just copying pasting from below.
When you are finished your file should look like the following:
Quote:#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.200
network 192.168.1.0
dns-nameservers 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
Once done, you might want to restart your networking service and up the interface by using the commands below..
Quote:/etc/init.d/networking restartand you are done. Congratulations, you can now use your static IP to connect to internet in Debian or Ubuntu.
ifup eth0