Linux is the free, open-source alternative to Microsoft Windows and Mac OS X. The operating system itself can be chopped down entirely to a raw text console, or it can utilize a desktop environment such as Gnome or KDE. This guide will explain how to assign an IP address on a Linux system through the use of a text console.
1. Switch to Root
- If you are not already logged in as ‘root’ (the Linux counterpart of ‘Administrator’), open a console program and type ‘su’ (without quote) and press enter.
- *Ubuntu Linux distributions usually have the root password the same as the account created when the operating system was installed.
- Enter your root password when prompted, and press enter.
2. Debian / Ubuntu / Kubuntu
- Make a backup of your /etc/network/interfaces file by typing the following in the console : ‘cp/etc/network/interfaces /etc/network/interfaces.backup’
- Type ‘vi /etc/network/interfaces’ and press enter : Press ‘i’ to enter into insert (editing) mode.
- Scroll down until you find your network interface card in the file (usually named eth0 for an ethernet connection, or wlan0 or wifi0 for a wifi connection).
- Change ‘iface eth0 inet dhcp’ to ‘iface eth0 inet static‘
- Add the following lines, substituting the IP address numbers with your desired configuration : address 192.168.0.10 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 184.108.40.206
- Save and exit from the file by pressing Escape (to enter vi command mode), then “:wq” and Enter
- Type ‘ifdown eth0’ and press enter.
- Type ‘ifup eth0’ and press enter.
3. Red Hat or Slackware
- The easiest method in Red Hat or Slackware is to type ‘netconfig’ in older versions or ‘ifconfig/netstat’ in new versions in a console as the root user : A text-based menu will guide you through its configuration settings.
- Write command in console nano /etc/sysconfig/network-scripts/ifcfg-eth0Use tab to move between fields : Use the spacebar to uncheck or check checkboxes.
- When you have input the desired settings, close settings window.
- To make these settings take effect, type ‘service network restart’ in the console and press enter (this step is not necessary under Slackware, where the changes are immediate).
[ Note: There are numerous distributions based on Red Hat Linux (Fedora Core, CentOS, White Box, et cetera); many of them are likely to avail one the same method. ]
4. Any Linux system with kernel version 2.4 or newer
This method is slightly more difficult, it involves using the console, but it should work on all modern linux distributions. The tool used is called “ip” and is usually located in the “/sbin/” directory.
- First you need to determine the name of the network interface to be used : To list all network interfaces available run “/sbin/ip link”. This should print a list of interface names, mac addresses and other info
- Next you assign the IP address using the “addr” subcommand, like this :“/sbin/ip addr add 192.168.0.10/24 dev [INTERFACE_NAME]”.
- The default gateway is added with the “route” subcommand, like this :“/sbin/ip route add default via [GATEWAY_ADDRESS]”.
- The last thing is bringing the interface up with the “link” subcommand:“/sbin/ip link set [INTERFACE_NAME] up”.
5. Dynamic IP address (DHCP)
Dynamic addresses are obtained automatically and usually do not require any attention from the user. However there are several specific cases:
- If the network has not been available all the time while the system was starting, the internet connection may stay disabled even after fixing the network problems : To revive it instantly, run dhclient as root. This will set the dynamic address.
- The previous situation may happen if the network is accessed by separate hardware that starts at the same time as your machine : In some cases Linux boots faster than the network router and finds no network at startup. Find dhclient.conf (for instance, /etc/dhcp3/dhclient.cof for Debian) and add/correct the line reboot nn;, where nn is the delay for which the system must wait after booting, for the router to start.
” Indian Institute of Code, Networks and Security ( IICNS ) “, industry relevant skills are what we develop. The rigorous training provided at IICNS equips students with Knowledge, Skills and Attitude to succeed. The IICNS Programs are based on inovation and interactive training methodologies derived from one experiences of providing training in corporate world. In effort, at the IICNS, we bring corporate to the classroom.
Why Choose this course ?
Degree type: BS(Hons)
Duration: 3 years (full-time) or 2.6 years (accelerated)
One of the greatest threats to information security could actually come from within your company or organization. Inside ‘ attacks ’ have been noted to be some of the most dangerous since these people are already quite familiar with the infrastructure. It is not
always disgruntled workers and corporate spies who are a threat. Security is to justify the value of a Cyber Security . After all, Cyber Security concerns more than the Information Technology (IT) and BCP/COOP departments.
As the world becomes increasingly interconnected, Business Continuity/COOP professionals must pay more attention to the security of their organization’s connections. It seems like every week there are new headlines about hackers bringing an organization to its knees. The stolen funds, bad publicity, and embarrassing revelations are front page news. How can you protect your organization from these issues? The best protection is to focus will be on u nin formed users who can do harm to your network by visiting websites infected with malware, responding to phishing e-mails, storing their login information in an unsecured location, or even giving out sensitive information over the phone when exposed to social engineering.