1. ##  (for ipfilter)  
  2. options IPFILTER  
  3. options IPFILTER_LOG  
  4. options IPFILTER_DEFAULT_BLOCK  
  5. ##  
  6.  
  7. ## (for IPFW)  
  8. options IPFIREWALL  
  9. options IPFIREWALL_DEFAULT_TO_ACCEPT  
  10. options IPFIREWALL_VERBOSE  
  11. options IPDIVERT  
  12. ##  

配置完成之后,编译并安装:

# cd /usr/src && make buildkernel KERNCONF=配置名 && make installkernel KERNCONF=配置名

FreeBSD PPPoE设置== .2. ==  配置

编译和安装成功后,修改ppp配置文件/etc/ppp/ppp.conf:

  1. ##  
  2. default: # or name_of_service_provider  
  3. set device PPPoE:fxp0      #替换fxp0为你的网卡接口设备名  
  4. set MRU 1490  
  5. set MTU 1490  
  6. set authname YOURLOGINNAME #PPPoE用户名  
  7. set authkey YOURPASSWORD   #PPPoE密码  
  8. set log Phase tun command  
  9. set dial  
  10. set login  
  11. set ifaddr 10.0.0.1/0 10.0.0.2/0  
  12. add default HISADDR  
  13. nat enable yes  
  14. set cd off  
  15. set crtscts off  
  16. set redial 0 0  
  17. papchap:  
  18. set authname                #PPPoE用户名  
  19. set authkey                 #PPPoE密码  
  20.  
  21. ##  

配置完成后,运行:

# ppp -dedicated

FreeBSD PPPoE设置== .3. ==   启动

如果一切顺利,那么可以设置fw和PPPoE为自动启动,在/etc/rc.conf中添加如下配置:

  1. ##  /etc/rc.conf  
  2. ppp_enable="YES" 
  3. ppp_mode="dedicated" 
  4. ppp_nat="YES" 
  5. ppp_profile="default" 
  6.  
  7. ##  (如果使用IPFW)  
  8. gateway_enable="YES" 
  9. firewall_enable="YES" 
  10. firewall_quiet="YES" 
  11. natd_interface="fxp0" 
  12. natd_enable="YES" 
  13.  
  14. ## (如果使用ipfilter)  
  15. gateway_enable="YES" 
  16. ipfilter_enable="YES" 
  17. ipnat_enable="YES" 

最后,就根据你自己的情况进行防火墙规则的配置吧。


相关内容

    暂无相关文章