Portál AbcLinuxu, 26. dubna 2024 08:33
/etc/hosts
něco jako
10.0.0.254 www.domain.sk www
127.0.0.1
. nevím, zda je to ještě aktuální, ale v Linux 2.4 NAT HOWTO se píše:
Altering the Destination of Locally-Generated Connections The NAT code allows you to insert DNAT rules in the OUTPUT chain, but this is not fully supported in 2.4 (it can be, but it requires a new configuration option, some testing, and a fair bit of coding, so unless someone contracts Rusty to write it, I wouldn't expect it soon). The current limitation is that you can only change the destination to the local machine (e.g. `j DNAT --to 127.0.0.1'), not to any other machine, otherwise the replies won't be translated correctly.
iptables -t nat -A POSTROUTING -s 1.2.3.4 -j SNAT --to-source 10.0.0.254nech paket vie kam ma ist spat...
tcpdump
na síťových rozhraních toho serveru i routeru, zda se ty pakety omylem nezatoulají někam jinam. Jednak se podle stavu počítadel v iptables
podívejte, kterými pravidly ty pakety vlastně procházejí.
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.