NETBSD+ADSL+IPF+QDNS
2009-05-13 14:20:32来源:未知 阅读 ()
# vi /etc/ifconfig.rtk0
inet 192.168.0.1 netmask 255.255.255.0
# vi /etc/ifconfig.tlp0
inet 192.168.1.2 netmask 255.255.255.0
配置主机名:
# vi /etc/myname
netbsd
# vi /etc/hosts
127.0.0.1 localhost netbsd
配置DNS解析:
# vi /etc/resolv.conf
nameserver 202.99.160.68
nameserver 202.99.168.8
配置网关:
# vi /etc/mygate
192.168.0.10
配置主机本地解析:
# vi /etc/hosts
192.168.0.10 win2k
配置SSHD服务:
# vi /etc/rc.conf
sshd=YES
# vi /etc/ssh/sshd_config
PermitRootLogin yes
安装配置ADSL:
# pkg_add rp-pppoe-3.5.tgz
# mkdir /etc/ppp
# cp /usr/pkg/share/examples/rp-pppoe/pppoe.conf /etc/ppp/pppoe.conf
# vi /etc/ppp/pppoe.conf
PEERDNS=yes
CONNECT_TIMEOUT=30
PPPOE_TIMEOUT=80
PIDFILE="/tmp/$CF_BASE-adsl.pid"
# adsl-setup
# adsl-start
配置防火墙代理上网:
# vi /etc/ipf.conf
=================================/etc/ipf.conf==============================
# +-----------+ +------------------------------+ +------------------+
# | ADSL-Modem|---| ppp0 tlp0 NAT+IPF rtk0 |---| Internal Network |
# +-----------+ +------------------------------+ +------------------+
#
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Interface: all
# Block all incoming and outgoing packets unless they're allowed later.
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
block in all
block out all
# Possibly dangerous: packets with ip-options, short and fragmented packets
block in log quick on ppp0 proto icmp from any to any
block in log quick all with short
block in log quick all with ipopts
block in log quick all with frag
block in log quick all with opt lsrr
block in log quick all with opt ssrr
# Local network traffic is allowed
pass out quick on lo0
pass in quick on lo0
pass out quick on rtk0
pass in quick on rtk0
# Block faked or unlikely "local" addresses
block in log body quick on ppp0 from 192.168.0.0/16 to any
block in log body quick on ppp0 from 172.16.0.0/12 to any
block in log body quick on ppp0 from 10.0.0.0/8 to any
block in log body quick on ppp0 from 192.0.2.0/24 to any
block in log body quick on ppp0 from 0.0.0.0/8 to any
block in log body quick on ppp0 from 127.0.0.0/8 to any
block in log body quick on ppp0 from 169.254.0.0/16 to any
block in log body quick on ppp0 from 224.0.0.0/3 to any
block in log body quick on ppp0 from 204.152.64.0/23 to any
# Blocking of outgoing faked or unlikely "internal" addresses
block out log body quick on ppp0 from any to 192.168.0.0/16
block out log body quick on ppp0 from any to 172.16.0.0/12
block out log body quick on ppp0 from any to 10.0.0.0/8
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- freebsd7 RAID0, Geom方式 成功 2009-05-13
- netbsd启动gnome失败! 2009-05-13
- 提示:bad kernel: arp : 内网IP地址 is on em0 but got rep 2009-05-13
- DragonFly BSD 2.2.1发布 2009-05-13
- NetBSD笔记 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash