This is a collection of my notes that I most frequently refer back to. Hopefully some of these may come in handy for others. NOTE: I take no responsibility for your systems if you follow these notes. Always do you own research and make sure you understand fully what it is you are doing.
Sunday, 13 August 2017
Changing Linux Network Configuration
To make changes to a Linux servers IP configuration, follow the steps below. Use :x to exit the files you are changing to save them:
Step 1 - Run ifconfig and note the name of the active network interface on the left. As standard this should always be eth0 but for some configurations it may be different
Step 2 - Run vim /etc/sysconfig/network-scripts/ifcfg-InterfaceName
Step 3 - In this file, make your changes to the IPADDR, NETMASK and GATEWAY fields. If there is no gateway field move onto the next step otherwise skip to step 5
Step 4 - Run vim /etc/sysconfig/network and change the gateway
Step 5 - Run service network restart to restart the network interface and pick up the changes. Any connections to the server will be lost when you do this.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment