FreeBSD PPPoE设置指导(1)(2)
- ## (for ipfilter)
- options IPFILTER
- options IPFILTER_LOG
- options IPFILTER_DEFAULT_BLOCK
- ##
- ## (for IPFW)
- options IPFIREWALL
- options IPFIREWALL_DEFAULT_TO_ACCEPT
- options IPFIREWALL_VERBOSE
- options IPDIVERT
- ##
配置完成之后,编译并安装:
# cd /usr/src && make buildkernel KERNCONF=配置名 && make installkernel KERNCONF=配置名
FreeBSD PPPoE设置== .2. == 配置
编译和安装成功后,修改ppp配置文件/etc/ppp/ppp.conf:
- ##
- default: # or name_of_service_provider
- set device PPPoE:fxp0 #替换fxp0为你的网卡接口设备名
- set MRU 1490
- set MTU 1490
- set authname YOURLOGINNAME #PPPoE用户名
- set authkey YOURPASSWORD #PPPoE密码
- set log Phase tun command
- set dial
- set login
- set ifaddr 10.0.0.1/0 10.0.0.2/0
- add default HISADDR
- nat enable yes
- set cd off
- set crtscts off
- set redial 0 0
- papchap:
- set authname #PPPoE用户名
- set authkey #PPPoE密码
- ##
配置完成后,运行:
# ppp -dedicated
FreeBSD PPPoE设置== .3. == 启动
如果一切顺利,那么可以设置fw和PPPoE为自动启动,在/etc/rc.conf中添加如下配置:
- ## /etc/rc.conf
- ppp_enable="YES"
- ppp_mode="dedicated"
- ppp_nat="YES"
- ppp_profile="default"
- ## (如果使用IPFW)
- gateway_enable="YES"
- firewall_enable="YES"
- firewall_quiet="YES"
- natd_interface="fxp0"
- natd_enable="YES"
- ## (如果使用ipfilter)
- gateway_enable="YES"
- ipfilter_enable="YES"
- ipnat_enable="YES"
最后,就根据你自己的情况进行防火墙规则的配置吧。
评论暂时关闭