при /etc/nestart вот такое сообщение:
Starting divert daemons: natdnatd: Unable to bind divert socket.: Address already in use
Are you sure? [yn]
нажимаю y, все работает. такое же и при перезагрузке системы!
rc.conf:
Код: Выделить всё
keymap="ru.koi8-r"
moused_enable="YES"
usbd_enable="YES"
samba_enable="YES"
sendmail_enable="NO"
ifconfig_rl0="inet 192.168.1.85 netmask 255.255.255.0"
# internet
ifconfig_rl1="inet 88.88.88.82 netmask 255.255.255.0"
hostname="FreeBSD.local"
sshd_enable="YES"
inetd_enable="YES"
gateway_enable="YES"
natd_enable="YES"
natd_interface="rl1"
defaultrouter="88.88.88.81"
#Firewall
firewall_enable="YES"
#firewall_type="/usr/local/etc/firewall.conf"
firewall_script="/usr/local/etc/ipfw.rules"
firewall_type="RULES"
Код: Выделить всё
#!/bin/sh -
fwcmd=/sbin/ipfw
##############
oif="rl1"
oip="88.88.88.82"
##############
iif="rl0"
iip="192.168.1.85"
##############
Mylan="192.168.1.0/24"
##############
${fwcmd} flush -f
${fwcmd} add allow ip from ${Mylan} via ${iif}
${fwcmd} add divert natd ip from ${Mylan} to any out via ${oif}
${fwcmd} add divert natd ip from any to ${oip} in via ${oif}
${fwcmd} add allow ip from ${oip} to any out via ${oif}
${fwcmd} add allow ip from any to ${oip} in via ${oif}
${fwcmd} add allow ip from ${Mylan} to any in via ${iif}
${fwcmd} add allow ip from ${Mylan} to any out via ${oif}
${fwcmd} add allow ip from any to ${Mylan} in via ${oif}
${fwcmd} add allow ip from any to ${Mylan} out via ${iif}
${fwcmd} add deny ip from any to any
Если надо еще какие-нибудь данные, с удовольствием выложу!!!