Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Аlchemist

Старожил


Сообщения: 437
Благодарности: 46

Профиль | Отправить PM | Цитировать


Цитата Dm1try:
То есть FORWARD и DIVERT - использовать не планируете? »
как раз планирую и ищу способы альтернативной реализации
Цитата Dm1try:
kernel NAT - это что? »
Вот тут обсуждали: http://www.opennet.ru/openforum/vslu...ID3/40608.html

А это я нашел в мане по ipfw:
Код: Выделить весь код
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

-------
IT house


Отправлено: 00:26, 09-08-2008 | #3