Страница 1 из 1
kernel nat
Добавлено: 2009-07-02 14:26:30
schizoid
в natd можно сделать так:
Код: Выделить всё
tcp inside2:2300-2399 3300-3399
will redirect incoming connections on ports 3300-3399 to host
inside2, ports 2300-2399. The mapping is 1:1 meaning port
3300 maps to 2300, 3301 maps to 2301, etc.
NAT такое умеет?
Re: kernel nat
Добавлено: 2009-07-02 15:13:28
terminus
по-ходу должен - пишут что:
Код: Выделить всё
REDIRECT AND LSNAT SUPPORT IN IPFW
Redirect and LSNAT support follow closely the syntax used in natd(8) See
Section EXAMPLES for some examples on how to do redirect and lsnat.
NAT, REDIRECT AND LSNAT
First redirect all the traffic to nat instance 123:
ipfw add nat 123 all from any to any
Then to configure nat instance 123 to alias all the outgoing traffic with
ip 192.168.0.123, blocking all incoming connections, trying to keep same
ports on both sides, clearing aliasing table on address change and keep-
ing a log of traffic/link statistics:
ipfw nat 123 config ip 192.168.0.123 log deny_in reset same_ports
Or to change address of instance 123, aliasing table will be cleared (see
reset option):
ipfw nat 123 config ip 10.0.0.1
To see configuration of nat instance 123:
ipfw nat 123 show config
To show logs of all the instances in range 111-999:
ipfw nat 111-999 show
To see configurations of all instances:
ipfw nat show config
Or a redirect rule with mixed modes could looks like:
ipfw nat 123 config redirect_addr 10.0.0.1 10.0.0.66
redirect_port tcp 192.168.0.1:80 500
redirect_proto udp 192.168.1.43 192.168.1.1
redirect_addr 192.168.0.10,192.168.0.11
10.0.0.100 # LSNAT
redirect_port tcp 192.168.0.1:80,192.168.0.10:22
500 # LSNAT
or it could be splitted in:
ipfw nat 1 config redirect_addr 10.0.0.1 10.0.0.66
ipfw nat 2 config redirect_port tcp 192.168.0.1:80 500
ipfw nat 3 config redirect_proto udp 192.168.1.43 192.168.1.1
ipfw nat 4 config redirect_addr
192.168.0.10,192.168.0.11,192.168.0.12
10.0.0.100
ipfw nat 5 config redirect_port tcp
192.168.0.1:80,192.168.0.10:22,192.168.0.20:25 500
Re: kernel nat
Добавлено: 2009-07-02 15:18:16
schizoid
в упор не вижу, имеется ввиду пул портов пробросить
Re: kernel nat
Добавлено: 2009-07-24 10:06:41
Caparzo
Имеется ввиду если у вас кластер серверов (в DMZ или за обычным шлюзом) и нужно распределить нагрузку, есть решение - LSNAT. По принципу карусели (round-robin) пакеты будут натиться на каждый из серверов по очереди).
Код: Выделить всё
redirect_port tcp 1.1.1.1:80, 1.1.1.2:80, 1.1.1.3:80 2.2.2.2:80
в данном примере все запросы на 2.2.2.2 на порт 80 будут перенаправляться на сервера внутри сети или DMZ, то бишь 1.1.1.1 - 1.1.1.3
LSNAT (RFC 2391) появилась в семёрке в ядерном нате.
Re: kernel nat
Добавлено: 2009-07-24 11:22:08
terminus
изначальный вопрос был про то может ли кернел нат производть редирект диапазона портов?
Код: Выделить всё
redirect_port 192.168.1.2:1000-1110 1000-1110
Может.
Re: kernel nat
Добавлено: 2009-07-27 15:23:38
schizoid
ща проверю

Re: kernel nat
Добавлено: 2009-07-27 15:38:28
schizoid
действительно, сенкс
а чего ж блин man молчит по этому поводу
