Linux за българи: Форуми

Linux секция за начинаещи => Настройка на програми => Темата е започната от: Hapkoc в May 05, 2006, 01:30



Титла: Iptables 1.3.3 -d проблем
Публикувано от: Hapkoc в May 05, 2006, 01:30
Ще прощавате за сигурно много глупавия въпрос, но - защо следното правило ми гърми с invalid argument:

# iptables -t nat -A PREROUTING -i eth0 -d ! 192.168.0.0/24 -j MASQUERADE

Инвалидният аргумент, доколкото разбрах, е '-d ! 192.168.0.0/24'. Пробвах с --destination, --dst, 192.168.0.0/255.255.255.0 и каквото още се сетих.

Debian testing, ядро 2.4.27-2-k7, iptables 1.3.3.


Титла: Iptables 1.3.3 -d проблем
Публикувано от: redcure в May 05, 2006, 02:15
"!" - за какво ти е?


Титла: Iptables 1.3.3 -d проблем
Публикувано от: BRADATA в May 05, 2006, 02:49
Цитат
MASQUERADE
This target is only valid in the nat table, in the POSTROUTING chain. It should only be used with dynamically assigned IP (dialup) connections: if you have a static IP address, you should use the SNAT target. Masquerading is equivalent to specifying a mapping to the IP address of the interface the packet is going out, but also has the effect that connections are forgotten when the interface goes down. This is the correct behavior when the next dialup is unlikely to have the same interface address (and hence any established connections are lost anyway). It takes one option:
:zzz:  :)  ;)





Титла: Iptables 1.3.3 -d проблем
Публикувано от: zgv в May 05, 2006, 03:33
Примерен код
aap linux # # iptables -t nat -A PREROUTING -i eth0 -d ! 192.168.0.0/24 -j MASQUERADE
aap linux #                                                                                        

При мен грешка не дава. Явно ти липсва някой модул към iptables. Това поне е моята идея, която съм напълно сигурен, че е вярна  ;)


Титла: Iptables 1.3.3 -d проблем
Публикувано от: Hapkoc в May 05, 2006, 04:32
BRADATA, мерси. :)

Добре е да се четат man-овете.