Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!
0 Пользователей и 1 Гость просматривают эту тему.
Сговорились что ли - http://www.linux.org.ru/forum/general/4613789;jsessionid=C6BFB604F6D7A9D6FCA700CA10C1EAE9
Later Kernels (>= 2.6.11-rc1) don't have the ability to NAT to multiple ranges anymore.
Цитата: roma333 от 18 Марта 2010, 13:00:49Сговорились что ли - http://www.linux.org.ru/forum/general/4613789;jsessionid=C6BFB604F6D7A9D6FCA700CA10C1EAE9 Не хочу тебя расстраивать, но с этого мы и начали
iptables -t nat -A POSTROUTING -p tcp --dport 80 -j SNAT --to 64.120.120.3-64.120.120.6 --persistent
Цитата: roma333 от 18 Марта 2010, 13:00:49Сговорились что ли - http://www.linux.org.ru/forum/general/4613789;jsessionid=C6BFB604F6D7A9D6FCA700CA10C1EAE9 Не хочу тебя расстраивать, но с этого мы и начали Пользователь решил продолжить мысль 18 Марта 2010, 11:48:00:Перечитываю мануал и никак не могу понять откуда это я взял то, что после 2.6.26 версии из ядра выпилили диапазоны. Там только это написано:ЦитироватьLater Kernels (>= 2.6.11-rc1) don't have the ability to NAT to multiple ranges anymore.Что значит теперь нельзя задавать больше одного диапазона. Но ведь один то задавать получается можно или я снова не так понял?
Patrick McHardy (3): SNAT/DNAT: add support for persistent multi-range NAT mappings Merge branch 'stable' of git://dev.medozas.de/iptables Bump version
iptables -A POSTROUTING -s 192.168.0.1 -m iprange --dst-range 194.187.190.1-194.187.190.254а так не работает?
В версию 1.4.4 добавили поддержку persistent multi-range NAT mappings (Нажмите, чтобы показать/скрыть)Код: [Выделить] Patrick McHardy (3): SNAT/DNAT: add support for persistent multi-range NAT mappings Merge branch 'stable' of git://dev.medozas.de/iptables Bump versionhttp://www.netfilter.org/projects/iptables/files/changes-iptables-1.4.4.txtТак что автору темы можно посоветовать просто обновить iptables
Ну раз в 1.4.4 добавили, наверное в 1.4.6 не удалили...
root@ubuntu:/etc# apt-get install iptables updateReading package lists... DoneBuilding dependency treeReading state information... Doneiptables is already the newest version.E: Couldn't find package update
Example iptables -t mangle -A PREROUTING -s 192.168.1.0/24 -j SAME --to 10.5.6.7-10.5.6.9 --nodstExplanation : Under normal action, the SAME target is calculating the followup connections based on both destination and source IP addresses. Using the --nodst option, it uses only the source IP address to find out which outgoing IP the NAT function should use for the specific connection. Without this argument, it uses a combination of the destination and source IP address.
ЦитироватьExample iptables -t mangle -A PREROUTING -s 192.168.1.0/24 -j SAME --to 10.5.6.7-10.5.6.9 --nodstExplanation : Under normal action, the SAME target is calculating the followup connections based on both destination and source IP addresses. Using the --nodst option, it uses only the source IP address to find out which outgoing IP the NAT function should use for the specific connection. Without this argument, it uses a combination of the destination and source IP address.http://www.linuxtopia.org/Linux_Firewall_iptables/x4620.html
Цитата: roma333 от 23 Марта 2010, 05:05:14ЦитироватьExample iptables -t mangle -A PREROUTING -s 192.168.1.0/24 -j SAME --to 10.5.6.7-10.5.6.9 --nodstExplanation : Under normal action, the SAME target is calculating the followup connections based on both destination and source IP addresses. Using the --nodst option, it uses only the source IP address to find out which outgoing IP the NAT function should use for the specific connection. Without this argument, it uses a combination of the destination and source IP address.http://www.linuxtopia.org/Linux_Firewall_iptables/x4620.htmlroot@ubuntu:/etc# cat /etc/iptables-save | iptables-restoreiptables-restore: line 11 failedroot@ubuntu:/etc# cat iptables-save | more# Generated by iptables-save v1.3.8 on Mon Sep 8 10:36:13 2008#TrEK add---------[*mangle:PREROUTING ACCEPT [0:0]:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]:POSTROUTING ACCEPT [0:0]#-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu-A PREROUTING -s 194.187.190.181 -j SAME --to 194.187.190.1-194.187.190.254 --nodstCOMMIT.........
Страница сгенерирована за 0.064 секунд. Запросов: 23.