免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: iceblood
打印 上一主题 下一主题

[FreeBSD] 利用 FreeBSD 组建安全的网关[原创] [复制链接]

论坛徽章:
0
11 [报告]
发表于 2002-04-15 00:23 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

和ip无关

论坛徽章:
0
12 [报告]
发表于 2002-09-23 11:22 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

你好!

我是一個FreeBSD的初學者,有機會在网絡上看到你發表的文章,
利用FreeBSD組建安全的网關,我依據內文的指示一一編制了內
核,/etc/rc.conf,/etc/ipfw.conf,/etc/rc.firewall後,
現在能夠從內网訪問internet,但不能夠從internet訪問我的网絡,
相信是DNS,及host制定不當。

現附上有關檔案,請多多指教。



                        ____________________
                        | xxx.xxx.xxx.xxx  |-----------xlo/tun0 adsl connect to internet
                        |     Gateway      |
                        |                  |
                        | 192.168.10.15    |-----------xl1 internat interface
                        |__________________|
                                 |
                                 |
                                 |
             ________________________________________
             |                   |                  |
            ns2                 www1                gigitw
      192.168.10.17         192.168.10.18       192.168.10.20
            |
            |
      192.168.10.16-------------ppp dailup server        


db.127.0.0

$TTL 3600
@ IN  SOA ns1.examples.com. root.ns1.examples.com. ( 1 10800 3600 604800 86400 )
  IN  NS  ns1.examples.com.
  IN  NS  ns2.examples.com.

1.0.0.127.IN-ADDR.ARPA.        IN  PTR   localhost.

db.192.168.10

$TTL 3600
@ IN  SOA ns1.examples.com. root.ns1.examples.com. ( 1 10800 3600 604800 86400 )
  IN  NS  ns1.examples.com.
  IN  NS  ns2.examples.com.

10.10.168.192.IN-ADDR.ARPA.    IN  PTR   router.examples.com.
18.10.168.192.IN-ADDR.ARPA.    IN  PTR   examples.com.
15.10.168.192.IN-ADDR.ARPA.    IN  PTR   ns1.examples.com.
17.10.168.192.IN-ADDR.ARPA.    IN  PTR   ns2.examples.com.
16.10.168.192.IN-ADDR.ARPA.    IN  PTR   windog.examples.com.
20.10.168.192.IN-ADDR.ARPA.    IN  PTR   gigitw.examples.com.
xx.xxx.xxx.xxx.IN-ADDR.ARPA.    IN  PTR   ns1.examples.com.   # real ip address



db.examples

$TTL 3600
@ IN  SOA ns1.examples.com. root.ns1.examples.com. ( 1 10800 3600 604800 86400 )
  IN  NS    ns1.examples.com.
  IN  NS    ns2.examples.com.
  IN  MX  0 ns2.examples.com.
localhost            IN  A     127.0.0.1
windog               IN  A     192.168.10.16
router               IN  A     192.168.10.10
@                    IN  A     192.168.10.15
ns1.examples.com.    IN  A     xxx.xxx.xx.xx              #real ip address
examples.com.        IN  A     192.168.10.18
ns2                  IN  A     192.168.10.17
gigitw               IN  A     192.168.10.20

www.examples.com.       IN  CNAME @
ftp.examples.com.       IN  CNAME @
smtp.examples.com.      IN  CNAME @
pop.examples.com.       IN  CNAME @

named.conf

options {
directory "/etc/namedb"&#59;
}&#59;

zone "0.0.127.IN-ADDR.ARPA" in {
type master&#59;
file "db.127.0.0"&#59;
notify no&#59;
}&#59;

zone "hooho.com" in {
type master&#59;
file "db.examples"&#59;
}&#59;

zone "10.168.192.IN-ADDR.ARPA" in {
type master&#59;
file "db.192.168.10"&#59;
}&#59;

zone "." in {
type hint&#59;
file "db.cache"&#59;
}&#59;

/etc/hosts

127.0.0.1      localhost.examples.com localhost
xxx.xx.xxx.xx  ns1.examples.com        ns1
192.168.10.15  examples.com            examples
192.168.10.16  windog.examples.com     windog
192.168.10.17  ns2.examples.com        ns2
192.168.10.18  www1.examples.com       www1
192.168.10.20  gigitw.examples.com     gigitw


Thank You

bopchung@yahoo.com.hk

论坛徽章:
0
13 [报告]
发表于 2002-09-23 12:01 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

没写完吧?应该还要装squid吧?

论坛徽章:
0
14 [报告]
发表于 2002-09-23 12:06 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

[这个贴子最后由bopchung在 2002/09/23 12:21pm 编辑]

写完哪!
沒有裝squid??

計劃Gateway 的作用為firewall,natd,dns server。

是否要裝、請多指導。

论坛徽章:
1
金牛座
日期:2014-05-29 15:55:47
15 [报告]
发表于 2002-09-23 14:07 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

[这个贴子最后由iceblood在 2002/09/23 02:12pm 编辑]
下面引用由JohnBull2002/09/23 12:01pm 发表的内容:
没写完吧?应该还要装squid吧?
我倒~知道NAT是做什么的吗?
还有你装SQUID的目的是什么?
请你把软件的功能搞明白了再批评。OK?
TO那位香港的兄弟,电子邮件一直在解答你的问题。有问题请继续联系。

论坛徽章:
0
16 [报告]
发表于 2002-09-23 19:21 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

非常高興,終於找到答案耶!



db.examples

$TTL 3600
@ IN  SOA ns1.examples.com. root.ns1.examples.com. ( 1 10800 3600 604800 86400 )
  IN  NS    ns1.examples.com.
  IN  NS    ns2.examples.com.
  IN  MX  0 ns2.examples.com.
localhost            IN  A     127.0.0.1
windog               IN  A     192.168.10.16
router               IN  A     192.168.10.10
@                    IN  A     192.168.10.15<=======================把這裡改為 @
ns1.examples.com.    IN  A     xxx.xxx.xxx.xxx  #real ip address     
www1.examples.com.   IN  A     192.168.10.18
ns2                  IN  A     192.168.10.17
gigitw               IN  A     192.168.10.20

www.examples.com.       IN  CNAME ns1.examples.com.
ftp.examples.com.       IN  CNAME ns1.examples.com.
smtp.examples.com.      IN  CNAME ns1.examples.com.
pop.examples.com.       IN  CNAME ns1.examples.com.

真的多謝你那份熱誠


bopchung@yahoo.com.hk

论坛徽章:
0
17 [报告]
发表于 2002-09-24 03:49 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

1) NAT could use tremendous amount of CPU power according to the IP addresses it is translating and actual bandwidth, so dose for the network byte order translation. plus cpu has to handle firewall rule sets. in order to achieve a certain performance, the box need heavy CPU power and quite a mount of RAM as packet buffer. Otherwsie the gateway would be slow and become a bottleneck, even dropping packets.
2) it would be better to add another card and put the web server at different ip network (so-called DMZ) with different security rule sets. of course, it will add more burden on that box.
3) squid is a good idea but it could be done with another box. idea of this is that shuting down the nat for all of other boxes on the LAN except the nat for the squid box. So whoever want to browse internet has to point their browsers to the proxy server.

论坛徽章:
1
金牛座
日期:2014-05-29 15:55:47
18 [报告]
发表于 2002-09-24 09:40 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

下面引用由ipfreak2002/09/24 03:49am 发表的内容:
1) NAT could use tremendous amount of CPU power according to the IP addresses it is translating and actual bandwidth, so dose for the network byte order translation. plus cpu has to handle firewal ...
呵呵~多谢你回答他的问题。

论坛徽章:
0
19 [报告]
发表于 2005-09-29 16:19 |只看该作者

利用 FreeBSD 组建安全的网关[原创]

如果要控制那些电脑能上网,那些不能上网怎样设置?我公司就有这样的要求,但目前只有一星期检查一次有没有私自上网的职员(很麻烦)
LHA 该用户已被删除
20 [报告]
发表于 2006-02-20 13:39 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP