URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 49685
[ Назад ]

Исходное сообщение
"/sbin/ipfw problem"

Отправлено phpinfo , 22-Окт-04 20:09 
#cat /etc/rc.firewall
#!/bin/sh

#var
ipfw="/sbin/ipfw"
local="192.168.1.0/24"
remote="195.138.*.*"
port="20,21,22,80,3306"
#

#flush
$ipfw -f flush
#

#table with MD ip addresses
$ipfw table 1 flush
$ipfw table 1 add 193.226.64.0/23
$ipfw table 1 add 195.234.159.0/24
$ipfw table 1 add 217.194.138.0/23
$ipfw table 1 add 195.138.96.0/19
$ipfw table 1 add 212.0.192.0/19
$ipfw table 1 add 194.102.152.0/23
$ipfw table 1 add 195.22.224.0/19
$ipfw table 1 add 217.26.160.0/23
$ipfw table 1 add 217.12.112.0/20
$ipfw table 1 add 212.56.192.0/19
$ipfw table 1 add 217.26.144.0/20
$ipfw table 1 add 81.180.64.0/20
$ipfw table 1 add 193.243.132.0/23
$ipfw table 1 add 80.97.56.0/22
$ipfw table 1 add 195.225.244.0/22
$ipfw table 1 add 83.218.192.0/19
#

#loopback
$ipfw add allow all from any to any via lo0
$ipfw add deny ip from any to 127.0.0.0/8
$ipfw add deny ip from 127.0.0.0/8 to any
#

#check-state
#$ipfw add check-state
#

#local
$ipfw add allow all from any to any via rl1
#


#nat
$ipfw add divert natd ip from $local to table\(1\) out xmit rl0
$ipfw add divert natd ip from table\(1\) to $remote
#

#port
# $ipfw add allow tcp from table\(1\) to any $port in
# $ipfw add allow tcp from any $port to table\(1\) out

#$ipfw add deny all from any to any


> whar i need from my firewall :
-natd, translate 192.168.1.0/24 to 195.138.*.* (& only allow ips from table 1)
-allow to access from outside to $ports only & from only table 1 ips.

if i uncomment "$ipfw add deny all from any to any" the nat won't work, why ?


Содержание

Сообщения в этом обсуждении
">nat won't work, why ? "
Отправлено poige , 23-Окт-04 07:52 
[...]
>
>if i uncomment "$ipfw add deny all from any to any" the
>nat won't work, why ?

1) Use verbose ("log") "deny" when trying to solve your ipfw
problems before crying "help" on forums.

2) Если, все-таки, без "памагите" обойтись не получается, то
cтоит выбирать адекватный (форуму) язык, наверное.

/poige
--
http://www.i.morning.ru/~poige/