[[email protected] ~]#route -n //查看路由表(ip route也可以查看)
[[email protected] ~]#route add default gw 10.77.50.1 //添加默认路由网关
[[email protected] ~]#route add -net 10.77.78.0 netmask 255.255.255.0 gw 10.77.50.1
//添加其他网段
检查防火墙的状态
[[email protected] ~]#/etc/init.d/iptables status
关闭/开启防火墙(即时生效)各2种方法
[[email protected] ~]#service iptables stop
[[email protected] ~]#/etc/init.d/iptables stop
[[email protected] ~]#service iptables start
[[email protected] ~]#/etc/init.d/iptables start
关闭/开启防火墙(永久关闭)重启后生效
[[email protected] ~]#chkconfig iptables off
[[email protected] ~]#chkconfig iptables on
时间: 2024-10-12 16:43:28