Escolar Documentos
Profissional Documentos
Cultura Documentos
2. Open network configuration file. In this example, it’ll configure on interface eth0. Type
vi /etc/sysconfig/network-scripts/ifcfg-eth0
4. Modify the file by press ‘i’ to enter insert mode. Change BOOTPROTO to static and add IP Address and Net mask as new lines
if they’re not existed yet..
BOOTPROTO=static
IPADDR=192.168.125.10
NETMASK=255.255.255.0
Save the configuration file by press ESC + ‘:’ and type ‘wq’ to write and quit the editor.
5. You can added these configuration to the config file. Replace [number] with your actual value.
GATEWAY=[number]
TYPE=Ethernet
NETWORK=[number]
BROADCAST=[number]
6. Restart the network interface card. Type
ifconfig
You can also check for Internet connectivity with nslookup or host command:
$ nslookup cyberciti.biz
Output:
Server: 10.0.80.11
Address: 10.0.80.11#53
Non-authoritative answer:
Name: cyberciti.biz
Address: 75.126.43.232
I am not an iptables expert by any means and nor do I claim to be (which explains the limited scope of this document). This
tutorial describes the steps for a basic configuration for the iptables firewall on RedHat Linux 9. I will only give instructions for
opening certain ports on a single ethernet adapter and conclude with blocking IP's of hosts you want to disallow access. Iptables
allows for much more than mentioned here, but this should be enough to get you started in opening ports for specific services and
protecting your server from unauthorized access. I will not be going into the details of installing iptables, so it is assumed you
already have it since the RedHat 9 installation includes it typically by default.
The first thing we want to do is make sure iptables is running and that it will always start at bootup. If you are not root then
become root and issue the following command.
/etc/init.d/iptables start
Now we will make sure it starts at bootup. In my previous tutorials I have used chkconfig, but this time I will use the RedHat Text
Mode Setup Utility. Issue the following command.
setup