Всех приветствую !
Есть некое правило
iptables -t nat -A POSTROUTING -p tcp -s 192.168.1.2 --dport 110 -o eth0 -j MASQUERADE
Как переписать данное правило чтобы к 110-му добавть скажем 80,443,25,3128.
Кто может помочь переписать правило с участие multiport.
iptables multiport (Правило)
Модератор: SLEDopit
Re: iptables multiport
Код: Выделить всё
iptables -t nat -A POSTROUTING -p tcp -s 192.168.1.2 --dport 110,80,443,25,3128 -o eth0 -j MASQUERADE
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
The more you believe you don't do mistakes, the more bugs are in your code.
Re: iptables multiport
SLEDopit писал(а): ↑11.04.2014 09:12Код: Выделить всё
iptables -t nat -A POSTROUTING -p tcp -s 192.168.1.2 --dport 110,80,443,25,3128 -o eth0 -j MASQUERADE
Ругается :-(
iptables v1.4.16.3: invalid port/service `110,80,443,25,3128' specified
Try `iptables -h' or 'iptables --help' for more information.
- Bizdelnick
- Модератор
- Сообщения: 20794
- Статус: nulla salus bello
- ОС: Debian GNU/Linux
Re: iptables multiport
-m multiport --dports 110,80,443,25,3128
Пишите правильно:
в консоли вку́пе (с чем-либо) в общем вообще | в течение (часа) новичок нюанс по умолчанию | приемлемо проблема пробовать трафик |
Re: iptables multiport
Спасиб о, вроде как правило отработало без ошибок :-)