stvol 4 Posted 2009-12-06 17:44:06 Share Posted 2009-12-06 17:44:06 Привет всем. Нужно пробросить порт (например 80) с первого внешнего ип на внутренюю машину.Также нужно пробросить такой же порт во второго ип на другую машинку в сети.Из всех примеров видел настройку только одного ната. В /etc/rc.conf – natd_enable="YES" natd_interface="rl0" natd_flags="-f /etc/natd.conf" В /etc/natd.conf – same_ports yes use_sockets yes redirect_port tcp 192.168.0.1:80 80 Проверил. Работает. Но надобы как-то и второй нат настроить.Сейчас пользую следущющий конфиг rc.conf firewall_enable="YES" natd_enable="YES" gateway_enable="YES" ifconfig_rl0="inet 172.17.17.2 netmask 255.255.255.0" ifconfig_rl1="inet 192.168.0.15 netmask 255.255.255.0" ifconfig_rl2="inet 174.17.17.2 netmask 255.255.255.0" hostname="myhost" defaultrouter="172.17.17.1" sshd_enable="YES" ntpdate_enable="YES" sendmail_enable="NONE" наты подымаю скриптом: #!/bin/sh fwcmd="/sbin/ipfw" natcmd="/sbin/natd" ${fwcmd} -f flush ${natcmd} -a 172.17.17.2 -p 8668 ${natcmd} -a 174.17.17.2 -p 8778 Может кто подскажет или ссыку даст где читнуть.Буду очень благодарен. Link to post Share on other sites
stvol 4 Posted 2009-12-08 16:49:37 Author Share Posted 2009-12-08 16:49:37 эх пойду на наге задам.. (( Link to post Share on other sites
prototip 286 Posted 2009-12-08 17:43:36 Share Posted 2009-12-08 17:43:36 Я вот не могу понять вот этого чуда ifconfig_rl0="inet 172.17.17.2 netmask 255.255.255.0" ifconfig_rl1="inet 192.168.0.15 netmask 255.255.255.0" ifconfig_rl2="inet 174.17.17.2 netmask 255.255.255.0" Две сетевые карты rl0 and rl2 имеют один и тот же IP ? Link to post Share on other sites
prototip 286 Posted 2009-12-08 17:53:00 Share Posted 2009-12-08 17:53:00 Я вот не могу понять вот этого чуда ifconfig_rl0="inet 172.17.17.2 netmask 255.255.255.0" ifconfig_rl1="inet 192.168.0.15 netmask 255.255.255.0" ifconfig_rl2="inet 174.17.17.2 netmask 255.255.255.0" Две сетевые карты rl0 and rl2 имеют один и тот же IP ? http://forum.oszone.net/post-1203676.html Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now