Chinaunix

标题: 实现永久数据包转发功能。 [打印本页]

作者: 山东大葱    时间: 2006-12-02 05:49
标题: 实现永久数据包转发功能。
/etc/sysctl.conf:

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0      #修改此处的0为1即可永久实现数据包的转发功能。

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

作者: 河里的鱼    时间: 2006-12-02 21:31
and reboot
作者: colddawn    时间: 2006-12-02 21:36
倒,永久数据包转发,还以为是什么,原来只是把ip forward打开了。这样你机器就能当路由器了。
作者: 山东大葱    时间: 2006-12-03 02:26
原帖由 colddawn 于 2006-12-2 21:36 发表
倒,永久数据包转发,还以为是什么,原来只是把ip forward打开了。这样你机器就能当路由器了。


本来就是要做路由转发嘛!
倒什么倒,让你媳妇扶着你还能倒下?
哈哈
作者: 枫影谁用了    时间: 2006-12-03 11:47
.....................................
作者: silence1214    时间: 2010-05-18 21:02
我想问 如果当路由的话,数据包转发给谁了呢?
作者: linux初学三月    时间: 2010-05-19 12:42
数据包转发给其它客户机
作者: ykaing    时间: 2010-05-19 17:16
我晕!这个就是当路由的作用的,实现不同网段的互通的,转发数据包当然是转发给不同的网段了!
作者: xyloveyy    时间: 2010-05-21 09:15
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2