Ubuntu SBS: Static IP address
Posted by RichFeb 9
This is just a quick post before the one about configuring the DNS server. On my clients network the server gets it’s IP address from the DHCP server. If you’re doing this then it’s important that your DHCP server always issues the same address to the server. How you do this will depend on your router.
Another option is to configure your server with a static IP address. To do this edit the /etc/network/interfaces file. You will be looking for a line like
iface eth0 inet dhcp
Once you have found that line replace it with the following (remember to change the IP address, subnet mask and gateway so they’re right for your network).
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
You should now restart the network interface
sudo ifdown eth0 sudo ifup eth0
If your network stops working then make sure you put in the right values. Oh, and remember to use an IP address that your DHCP server won’t try giving to another computer.
Setting up the domain name server will be out later today
This site contains my personal ramblings on Linux, PHP, Java, .NET and anything else that I feel is important.
Leave a Reply