【需求】
掌握Red Hat Linux下的配置网络地址和网络安全的方法。
【系统及软件环境】
操作系统:Red Hat Linux
【实验配置文件及命令】
1.命令: ifconfig ifdown ifup route
2. 命令:使用echo配置/proc/sys/net/ipv4下的icmp_echo-ignore_all和ip_default_ttl来增加系统的安全性。
【实验步骤】
1. 在虚拟机vmware打开后,首先为linux系统添加一块虚拟网卡,再打开linux系统。
2. 设置网卡eth0的地址
[root@localhost ~]# ifconfig eth0 192.168.1.180netmask 255.255.255.0设置网卡eth0的IP地址
[root@localhost ~]# route add -net 192.168.1.0netmask 255.255.255.0 dev eth0
[root@localhost ~]# route add default gw192.168.1.1 设置网卡网关地址
[root@localhost ~]# vi /etc/resolv.conf设置DNS地址
search localdomain
nameserver 202.103.24.68
nameserver 202.103.44.150
[root@localhost ~