Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Общий по FreeBSD (http://forum.oszone.net/forumdisplay.php?f=10)
-   -   Kernel NAT в FreeBSD 8.2 (http://forum.oszone.net/showthread.php?t=203989)

LLC 05-04-2011 15:23 1651556

Kernel NAT в FreeBSD 8.2
 
добрый день!
Не могу заставить работать ядерный нат, почти во всех документациях предлогают пересобрать ядро, но так же пишут, что можно все сделать без компиляции ядра, модулями, чего собственно я и хочу сделать.
У кого нибуть получалось заставить работать этот нат без сборки ядра?
Вот моя конфигурация:

cat /etc/sysctl.conf
net.inet.ip.forwarding=1
net.inet.ip.fw.verbose=1
net.inet.ip.fw.one_pass=0

#cat /etc/rc.conf
defaultrouter="192.168.240.1"
hostname="gate"
ifconfig_em0="inet 10.0.0.1 netmask 255.255.255.0 -rxcsum"
ifconfig_em1="inet 192.168.240.250 netmask 255.255.255.0"
keymap="ru.koi8-r"
sshd_enable="YES"
ntpd_enable="YES"
apache22_enable="YES"
named_enable="YES"
gateway_enable="YES"
firewall_enable="YES"
firewall_script="/etc/firewall"
firewall_logging="YES"
#firewall_type="open"
firewall_nat_enable="YES"
firewall_nat_interface="em1"

#cat /etc/firewall
ipfw add 10 allow ip from any to any
ipfw nat 1 config log if em1 reset same_ports
ipfw add 200 nat 1 log ip from any to 192.168.240.250 via em1

#ipfw show
00010 484081 35133048 allow ip from any to any
00200 0 0 nat 1 log ip from any to 192.168.240.250 via em1
65535 0 0 deny ip from any to any

#ipfw nat 1 show
nat 1:

#dmesg | grep diver
ipfw2 (+ipv6) initialized, divert loadable, nat loadable, rule-based forwarding disabled, default to deny, logging disabled

gf100 05-04-2011 22:13 1651801

Цитата:

Цитата LLC
#ipfw show
00010 484081 35133048 allow ip from any to any
00200 0 0 nat 1 log ip from any to 192.168.240.250 via em1»

Пакеты до 200-го правила не добираются...

LLC 06-04-2011 10:14 1652043

Спасибо!! ушел читать man ipfw :)


Время: 02:52.

Время: 02:52.
© OSzone.net 2001-