- 论坛徽章:
- 0
|
系统版本:Linux version 2.6.18-8.el5
配置如下:请高手指点,谢谢!
[root@localhost rc.d]# more rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
ifconfig eth0 10.10.178.18 netmask 255.255.255.248
ifconfig eth0 up
ifconfig eth1 192.168.3.1 netmask 255.255.255.0
ifconfig eth1 up
route add default gw 10.10.178.17
route add -net 10.16.0.0 netmask 255.255.0.0 gw 192.168.3.2
iptables -F
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 10.10.178.18
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo "1" > /proc/sys/net/ipv4/ip_forward
rm -rf issue
rm -rf issue.net
cp logo issue
[root@localhost rc.d]# |
|