QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 731|回复: 3

关于red hat9共享ADSL

[复制链接]
发表于 2003-10-17 09:26:25 | 显示全部楼层 |阅读模式
各位兄弟,我刚用linux,请问怎么用red hat9作代理共享ADSL啊,双网卡的,我在网上找了几篇资料,可都看不懂,原来我的liunx可以用ADSL拨号上网,按资料改了以后拨号都拨不上去了。请朋友们帮看看,谢谢


9.配置DHCPD使内部网络机器自动获得IP地址.

修改/etc/dhcpd.conf, 修改后如下:

#Start of /etc/dhcpd.conf

ddns-update-style interim;

ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway

option routers 192.168.0.1;

option subnet-mask 255.255.255.0;

option nis-domain "domain.org";

option domain-name "domain.org";

# --- option domain-name-servers ISP's DNS1,ISP's DNS2;

option domain-name-servers 192.168.0.1,142.177.1.2,142.177.129.11;

option time-offset -18000; # Eastern Standard Time

# --- Selects point-to-point node (default is hybrid). Don't change this unless

# -- you understand Netbios very well

# option netbios-node-type 2;

range dynamic-bootp 192.168.0.2 192.168.0.254;

default-lease-time 21600;

max-lease-time 43200;

}

#End of /etc/dhcpd.conf


0.修改/etc/sysconfig/iptables(把原有的内容都删除),修改完如下,以使VDSL和代理在开机时自动生效。

# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002

*mangle

REROUTING ACCEPT [3184]

:INPUT ACCEPT [3182]

:FORWARD ACCEPT [2]

:OUTPUT ACCEPT [2797]

OSTROUTING ACCEPT [2799]

COMMIT

# Completed on Tue Oct 29 22:28:14 2002

# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002

*nat

REROUTING ACCEPT [73]

OSTROUTING ACCEPT [22]

:OUTPUT ACCEPT [213]

[212] -A POSTROUTING -o ppp0 -j MASQUERADE

COMMIT

# Completed on Tue Oct 29 22:28:14 2002

# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002

*filter

:INPUT ACCEPT [20227]

:FORWARD ACCEPT [370]

:OUTPUT ACCEPT [15374]

COMMIT

# Completed on Tue Oct 29 22:28:14 2002

12. 修改/etc/sysctl.conf,把net.ipv4.ip_forward设置成1,如下:

net.ipv4.ip_forward = 1

如此一来,每次你重新启动机器或重新启动网络服务(/etc/init.d/network restart)时就会自动启动ip转发功能!

13.关闭ipchain自动启动服务,开启iptables自动启动服务(如果已经设定,可以忽略这步)

输入以下命令行:

[jackey@localhost jackey]$ su

Password:

[root@localhost jackey]# cd /etc/init.d/

[root@localhost init.d]# chkconfig --del ipchains --level 2345

[root@localhost init.d]# chkconfig --add iptables --level 2345

上面的我都是直接抄的,重启机子以后网都上不去了,但ADSL可以拨号,不知道什么原因,拜托朋友们帮忙看看,还有能不能有份关于这个的详细教程,让我这样的菜鸟能看懂的,多谢了
 楼主| 发表于 2003-10-17 13:33:40 | 显示全部楼层
呵呵,我搞定了,原来不用那么复杂的
回复

使用道具 举报

发表于 2003-10-18 15:16:34 | 显示全部楼层
如何???请教~~~~
回复

使用道具 举报

发表于 2003-10-19 23:07:52 | 显示全部楼层
REDHAT9可以用一张网卡来做路由主机么 ?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-15 21:12 , Processed in 0.042634 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表