Build a Home-Office Router Using FreeBSD and …
2009-05-13 02:35:55来源:未知 阅读 ()
Build a Home-Office Router Using FreeBSD and PF
Created: 03/21/2006
General Information
This guide will outline the basic steps for building a home-office router for use with a cable modem or DSL line using FreeBSD and Packet Filter (PF). It will cover updating FreeBSD, building a new kernel, and installing and configuring a DHCP server and DNS server to support a small internal network.
Requirements
Before beginning, we need to decide which network adapter is going to be connected to the internal network and which one is going to be connected to the external network (cable modem or DSL line).
Run 'ifconfig' from the command line to list the network adapters:
$ ifconfig
dc0: flags=108843 mtu 1500
inet6 fe80::20c:29ff:fefc:800c%lnc0 prefixlen 64 scopeid 0x1
inet 192.168.130.133 netmask 0xffffff00 broadcast 192.168.130.255
ether 00:0c:29:fc:80:0c
xl0: flags=108802 mtu 1500
ether 00:0c:29:fc:80:16
lo0: flags=8049 mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
For this document I am going to use the following configuration:
dc0: external interface (IP address provided by ISP's DHCP server)
xl0: internal interface (IP address is static, 192.168.10.1)
Internal network: 192.168.10.0/255.255.255.0
Installation
Kernel source
First, we need to ensure that the kernel source is installed. We will need the kernel source to recompile the kernel to add PF support. The kernel source can be installed using 'sysinstall' utility.
From the sysinstall menu:
Update the system
Next we need to update
the system
(don't compile a kernel yet) and
the ports tree
.
Install network services
Once the system has been updated, we can install a few necessary services on our system; a DHCP server to provide IP addresses to clients on the internal network, and a DNS server to forward DNS requests from the internal clients to our ISP's DNS servers.
DHCP server:
#
#
cd /usr/ports/net/ics-dhcp3-server
make install clean (the default options are fine)
DNS server:
#
#
cd /usr/ports/dns/bind9
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
- DragonFly BSD 2.2.1发布 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