Portál AbcLinuxu, 31. října 2025 07:59
/etc/hosts něco jako
10.0.0.254 www.domain.sk www
             28.11.2007 16:57
frEon             | skóre: 40
            
             | Praha
        28.11.2007 16:57
frEon             | skóre: 40
            
             | Praha
         
            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.