LINUX.ORG.RU
решено ФорумAdmin

Помогите с iptables.

 


0

1
-A FORWARD -i eth0 -m state --state NEW -m tcp -p tcp -d 192.168.0.242 --dport 7778 -j ACCEPT

У меня 2 интерфейса (eth0 и eth1).
Нужно перенаправить порт через eth1, т.к. eth0 не видит 192.168.0.242.
Как такое сотворить ? C -i не получилось.

★★★★★

Сам справился.

  [!] -i, --in-interface name
              Name  of  an interface via which a packet was received (only for packets entering the INPUT, FORWARD and PREROUTING chains).  When the "!" argument is used before
              the interface name, the sense is inverted.  If the interface name ends in a "+", then any interface which begins with this name will match.   If  this  option  is
              omitted, any interface name will match.

       [!] -o, --out-interface name
              Name  of  an  interface  via  which a packet is going to be sent (for packets entering the FORWARD, OUTPUT and POSTROUTING chains).  When the "!" argument is used
              before the interface name, the sense is inverted.  If the interface name ends in a "+", then any interface which begins with this name will match.  If this option
              is omitted, any interface name will match.

dada ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.