|
FreeBSD6.0,内核已经编译过.
这是ppp.conf配置:
default:
set device PPPoE:ed0
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
set timeout 60
enable dns
add default HISADDR
pppoe:
set authname XXXXXX
set authkey XXXXXX
ipfw.conf配置:
add 00400 divert natd ip from any to any via tun0
add 19997 check-state
add 19998 allow tcp from any to any out keep-state setup
add 19999 allow tcp from any to any out
add 29999 allow udp from any to any
add 30005 allow icmp from any to any
add 40000 allow all from 192.168.0.0/16 to any
add 40001 allow all from any to 192.168.0.0/16
rc.conf的配置:
gateway_enable="YES"
hostname="myweb.com"
ifconfig_ed0="inet 192.168.0.1 netmask 255.255.255.0"
inetd_enable="YES"
linux_enable="YES"
sshd_enable="YES"
usbd_enable="YES"
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.conf"
firewall_logging_enable="YES"
natd_enable="YES"
natd_interface="tun0"
natd_flags="-f /etc/natd.conf"
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="pppoe"
现在的现象是这台网关能获取动态IP,但是ping外网都ping不通.内网可以互ping.请大侠们指教! |
|