Garey's Blog–FreeBSD/PHP/GoLang

文章标签 ‘natd’

在网关实现了之后,现在又需要把内网的机器某些端口映射到网关上,来实现从外网连接内部服务器的需求。 具体网关的实现,请参考:http://garey.bsdart.org/2010/03/freebsd-8-0的网关实现手册ipfwnatd/ 在网关实现了之后,只需要作如下调整,即可实现端口重定向。 一、增加映射规则 vi /etc/rc.conf natd_flags="-f /etc/natd.conf" vi /etc/natd.conf log yes redirect_port…

三月 18th, 2010

FreeBSD 8.0的网关实现手册(ipfw+natd)

1 Comment, FreeBSD, by garey, 12,322 views.

一、编译内核 编辑内核文件,增加如下几行: options    IPFIREWALL options    IPDIVERT options    IPFIREWALL_VERBOSE options    IPFIREWALL_VERBOSE_LIMIT=5 重新编译内核。 二、配置启动项 vi /etc/rc.conf gateway_enable="YES" …