设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 操作系统 >> OpenBSD >> 利用FreeBSD组建安全的网关
精品推荐
OpenBSD点击TOP10
·Free BSD,Linux之比较
·freebsd VPN 搭建
·freebsd系统时间同步及ntp服务的提供
·freebsd ipf+ipnat+ipfw建立带流量控制的透明网关
·FreeBSD的配置
·ipf+ipnat+ipfw建立带流量控制的透明网关
·POSTFIX下的反垃圾反病毒邮件系统
·FreeBSD 5.2.1R Web Server架设实例过程
·OpenBSD可加载内核模块编程完全指南
·FreeBSD+IPFILTER实现整网(N个Vlan)透明代理上网
操作系统点击TOP10
·Windows Vista完全硬盘安装法
·Windows Vista 激活不求人
·Windows Vista局域网网络连接设置
·Windows Vista系统动态桌面截图欣赏
·Windows XP中磁盘的分区应用
·Windows NT/2000/XP 出现蓝屏并显示“STOP 0x0000007f”错误
·让Windows XP变身Vista
·一招搞定Vista系统软件不兼容问题
·教你如何正确配置和优化Windows Vista
·只转两圈 加快Windows XP启动速度
精选专题

利用FreeBSD组建安全的网关

作者: 来源:网络文章 时间:2005-12-13 0:45:42

利用FreeBSD组建安全的网关(3)
#######tcp#########

add 10000 allow tcp from xx.xx.xx.xx to x.x.x.x 22 in //向Internet的xx.xx.xx.xx这个IP开放SSH服务。也就是只信任这个IP的SSH登陆。

add 10001 allow tcp from any to x.x.x.x 80 in //向整个Internet开放HTTP服务。

add 10002 allow tcp from any to x.x.x.x 25 in //向整个Internet开放smtp服务。

add 10003 allow tcp from any to x.x.x.x 110 in //向整个Internet开放pop3服务。

add 19997 check-state

add 19998 allow tcp from any to any out keep-state setup

add 19999 allow tcp from any to any out //这三个组合起来是允许内部网络访问出去,如果想服务器自己不和Internet进行tcp连接出去,可以把19997和19998去掉。(不影响Internet对服务器的访问)

######udp##########

add 20001 allow udp from any 53 to me in recv xl0 //允许其他DNS服务器的信息进入该服务器,因为自己要进行DNS解析嘛~

add 20002 allow udp from any to x.x.x.x 53 in recv xl0 //向整个Internet开放DNS服务。

add 29999 allow udp from any to any out //允许自己的UDP包往外发送。

######icmp#########

add 30000 allow icmp from any to any icmptypes 3

add 30001 allow icmp from any to any icmptypes 4

add 30002 allow icmp from any to any icmptypes 8 out

add 30003 allow icmp from any to any icmptypes 0 in

add 30004 allow icmp from any to any icmptypes 11 in //允许自己ping别人的服务器。也允许内部网络用router命令进行路由跟踪。

#######lan##########

add 40000 allow all from 192.168.0.0/16 to any

add 40001 allow all from any to 192.168.0.0/16 //允许内部网络访问Internet。




好了,还有natd没设置了,我们再次添加/etc/natd.conf这个文件,其内容如下:




log yes //启动natd的log记录。

redirect_port tcp 192.168.0.2:25 x.x.x.x:25 //把对服务器IP为x.x.x.x的smtp访问转到192.168.0.2的25上去。

redirect_port tcp 192.168.0.2:80 x.x.x.x:80 //把对服务器IP为x.x.x.x的http访问转到192.168.0.2的80上去。

redirect_port tcp 192.168.0.2:110 x.x.x.x:110 //把对服务器IP为x.x.x.x的pop3访问转到192.168.0.2的110上去。
共4页 9 7 [1] [2] [3] [48 :>

利用FreeBSD组建安全的网关 相关文章:
利用FreeBSD组建安全的网关 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com