Portál AbcLinuxu, 13. května 2025 22:49
REDIRECT
This target is only valid in the nat table, in the PREROUTING and OUTPUT chains, and user-defined chains which are only called from those chains. It alters the destination IP address to send the packet to the machine itself (locally-generated packets are mapped to the 127.0.0.1 address). It takes one option:
--to-ports port[-port] This specifies a destination port or range of ports to use: without this, the destination port is never altered. This is only valid if the rule also specifies -p tcp or -p udp.
[...]
to je pekne ale funguje to na porty ne na ip.....Tomu nerozumím ... pokud bude pravidlo v pořadí: povolené adresy mohou přes port80 a zbytek je REDIRECT na IP 10.x.x.x --dport 80, tak proč by to nemělo chodit? V opačném případě by byla ještě asi možnost použít SQUIDa, všechny požadavky na portu 80 směrovat na něj a tam rozhodnout, co dál ...
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.