Setting LAN IP static?
Yeah, noob question. I'm used to renting a server from a company with everything configured but now that I have my own server at home I need some help, so please bear with me. I have computer set up with centOS 6.3 and I plan on running a minecraft server on it for me and my buds. But everytime it boots up its local IP (192.168.1.xxx) address changes and screws up the port forwarding. How can I set the local IP to where it wont change?
change /etc/sysconfig/network-scripts/ifcfg-(network interface name eth0-1) the one you are using
this file should contain
BROADCAST= #broadcast adress of your network like 10.1.1.255
HWADDR= #hardware aders of your network card 00:11:11:00:2C:D0
IPADDR= #Network adres of your server like 10.1.1.10
NETMASK= # network mask of your network like 255.255.255.0
NETWORK= # network adres of your netwrork like 10.1.1.0
NAME= #name of your server
GATEWAY= # ip adres of your gateway like 10.1.1.201
DNS1= #ip aders of your dns server like 22.214.171.124
DNS2= #other ip of a second dns server
This is the definitive way to do this. If you want a nice pretty interface to this you can, of course, use the 'system-config-network' tool (you might need to install this using yum if it's not already there). If you're using NetworkManager to handle your networks, you can use it's interface to handle this - the GUI version of that requires you to be logged on and using X, of course, although there are command line tools to operate it too.
Originally Posted by ErwinMaas