Я тут уже неделю борюсь с mpd+freeradius+freebsd 6+freenibs+ipfw+natd.Подключаюсь WinXP к серверу, создается интерфейс ng0.
Сервер подключен в Инет, интерфейс tun0.
ipfw+natd:
natd -n tun0 -p 8668
sleep 3
ipfw 20 add divert natd all from 192.168.11.21 to any via tun0
# cat /etc/rc.conf |grep -v '#'
gateway_enable="YES"
netgraph_enable="YES"
firewall_enable="YES"
firewall_type="OPEN"
dhcpd_enable="YES"
dhcpd_flags="-q"
dhcpd_ifaces="rl0"
named_enable="YES"
[i]router_flags="-s"
router="routed"
router_enable="YES"[/i]
подсказывали, что можно включить - поможет...
# sysctl -a |grep forward
net.inet.ip.forwarding: 1
net.inet.ip.fastforwarding: 0
net.inet6.ip6.forwarding: 0
Делаю пинг на подключеной машине...
# tcpdump -i ng0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ng0, link-type NULL (BSD loopback), capture size 96 bytes
23:54:47.104305 IP 192.168.11.21 > ya.ru: ICMP echo request, id 768, seq 1024, length 40
23:54:52.428643 IP 192.168.11.21 > ya.ru: ICMP echo request, id 768, seq 1280, length 40
# tcpdump -i tun0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type NULL (BSD loopback), capture size 96 bytes
23:54:47.104504 IP k152-25.saltov.net > ya.ru: ICMP echo request, id 768, seq 1024, length 40
23:54:47.229275 IP ya.ru > k152-25.saltov.net: ICMP echo reply, id 768, seq 1024, length 40
23:54:52.428841 IP k152-25.saltov.net > ya.ru: ICMP echo request, id 768, seq 1280, length 40
23:54:52.549914 IP ya.ru > k152-25.saltov.net: ICMP echo reply, id 768, seq 1280, length 40