swap的最小空间(Minimum amount of swap space):使用大概你RAM内存的两倍就足够了。假如你不确定的话,可以使用OpenBSD FAQ 第四部分中列出的分割大小列表。
对大硬盘的支持(Large disk support): 当硬盘无法启动的时候,就算系统安装完全顺利,你也需要用硬盘或者电脑厂商的程序来让硬盘变的可启动。有些时候,非凡是当电脑有一个很老的BIOS时,你的系统可能无法识别硬盘的大小。这种问题应该不会影响到OpenBSD的安装,但当安装结束以后,你必须去你电脑或者硬盘的厂商的网站上去下载驱动或者配置程序来让系统工作。假如你还有问题,阅读安装文档,那里非常具体的斤记录了一些不同的方法来解决大硬盘的问题。
# redirect HTTP requests from foreign hosts rdr tun0 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 tcp rdr tun0 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 udp # redirect HTTP requests from the private internal net rdr ne1 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 tcp rdr ne1 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 udp # redirect HTTP requests from the DMZ rdr ne2 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 tcp rdr ne2 x.x.x.x/32 port 80 -> 192.168.2.254 port 8080 udp
# redirect SMTP requests from foreign hosts rdr tun0 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 tcp rdr tun0 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 udp # redirect SMTP requests from the private internal net rdr ne1 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 tcp rdr ne1 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 udp # redirect SMTP requests from the DMZ rdr ne2 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 tcp rdr ne2 x.x.x.x/32 port 25 -> 192.168.2.253 port 25 udp
pass out quick on tun0 proto tcp from 192.168.1.0/24 to any keep state pass out quick on tun0 proto udp from 192.168.1.0/24 to any keep state pass out quick on tun0 proto icmp from 192.168.1.0/24 to any keep state
pass out quick on tun0 proto tcp from 192.168.2.0/24 to any keep state pass out quick on tun0 proto udp from 192.168.2.0/24 to any keep state pass out quick on tun0 proto icmp from 192.168.2.0/24 to any keep state
pass in quick on tun0 proto tcp/udp from any to x.x.x.x/32 port = 80 keep state pass in quick on tun0 proto tcp/udp from any to 192.168.2.254/32 port = 8080 keep state
pass in quick on tun0 proto tcp/udp from any to x.x.x.x/32 port = 25 keep state pass in quick on tun0 proto tcp/udp from any to 192.168.2.253/32 port = 25 keep state
pass out quick on ne1 proto tcp from 192.168.1.1 to 192.168.1.2/32 port = 53 keep state pass out quick on ne1 proto udp from 192.168.1.1 to 192.168.1.2/32 port = 53 keep state
block in quick on ne1 from 172.16.0.0/12 to any block in quick on ne1 from 10.0.0.0/8 to any block in quick on ne1 from 127.0.0.0/8 to any block in quick on ne1 from 0.0.0.0/8 to any block in quick on ne1 from 169.254.0.0/16 to any block in quick on ne1 from 192.0.2.0/24 to any block in quick on ne1 from 204.152.64.0/23 to any block in quick on ne1 from 224.0.0.0/3 to any block in log quick on ne1 from x.x.x.x/32 to any block in log quick on ne1 from any to x.x.x.0/32 block in log quick on ne1 from any to x.x.x.255/32 pass in quick on ne1 proto tcp from 192.168.1.0/24 to any keep state pass in quick on ne1 proto udp from 192.168.1.0/24 to any keep state pass in quick on ne1 proto icmp from 192.168.1.0/24 to any keep state block in quick on ne1 all
pass out quick on ne2 proto tcp from 192.168.1.0/24 to 192.168.2.0/24 keep state pass out quick on ne2 proto udp from 192.168.1.0/24 to 192.168.2.0/24 keep state pass out quick on ne2 proto icmp from 192.168.1.0/24 to 192.168.2.0/24 keep state
下来,我们将阻拦所有送去不合法地址的数据包:
block out quick on ne2 from any to 192.168.0.0/16
block out quick on ne2 from any to 172.16.0.0/12
block out quick on ne2 from any to 127.0.0.0/8
block out quick on ne2 from any to 10.0.0.0/8
block out quick on ne2 from any to 0.0.0.0/8
block out quick on ne2 from any to 169.254.0.0/16
block out quick on ne2 from any to 192.0.2.0/24
block out quick on ne2 from any to 204.152.64.0/23
block out quick on ne2 from any to 224.0.0.0/3
最后,我们将让从外部发送到公开地址的数据包通过:
pass out quick on ne2 proto tcp from any to 192.168.2.254/32 port = 8080 keep state pass out quick on ne2 proto udp from any to 192.168.2.254/32 port = 8080 keep state pass out quick on ne2 proto tcp from any to 192.168.2.253/32 port = 25 keep state pass out quick on ne2 proto udp from any to 192.168.2.253/32 port = 25 keep state
其它的数据包将因安全原因而拦截:
block out quick on ne2 all
对于从DMZ发送到Internet上的数据包,我们将让所有从合法地址发送的数据包通过:
block in quick on ne2 from 172.16.0.0/12 to any block in quick on ne2 from 10.0.0.0/8 to any block in quick on ne2 from 127.0.0.0/8 to any block in quick on ne2 from 0.0.0.0/8 to any block in quick on ne2 from 169.254.0.0/16 to any block in quick on ne2 from 192.0.2.0/24 to any block in quick on ne2 from 204.152.64.0/23 to any block in quick on ne2 from 224.0.0.0/3 to any block in log quick on ne2 from x.x.x.x/32 to any block in log quick on ne2 from any to x.x.x.0/32 block in log quick on ne2 from any to x.x.x.255/32 pass in quick on ne2 proto tcp from 192.168.2.0/24 to any keep state pass in quick on ne2 proto udp from 192.168.2.0/24 to any keep state pass in quick on ne2 proto icmp from 192.168.2.0/24 to any keep state block in quick on ne2 all