Coenraad Loubser wrote:
> I've got a webserver running on port 80. Why can't external sites access it
> after I execute the following? The intended port gets through... but I
> suspect everything else goes to the forwarded
> port too...
>
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5678 -j DNAT --to-dest
> 192.168.0.95
> iptables -A FORWARD -p tcp -i eth0 --dport 5678 -d 192.168.0.95 -j ACCEPT
If you've got the webserver running in port 80 then you should change
your rules to:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5678 -j DNAT
--to-dest 192.168.0.95:80
iptables -A FORWARD -p tcp -i eth0 --dport 80 -d 192.168.0.95 -j ACCEPT
Regards.
--
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
(E-Mail Removed)
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA
The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
-- Jack Kerouac, "On the Road"