You need an OUTPUT DNAT rule as well (and NAT of local connections
enabled in your kernel config), or to use a redirector helper rewriting
the IP address to the real destination..

Regards
Henrik



Siew Wing Loon wrote:
> 
> Hi,
> 
> I have my squid running fine but having problem
> assessing to IP address using iptables DNAT
> 
> FW + Squid using External IP Address 2.2.2.1
> 
> iptables -t nat -A PREROUTING -p tcp -d 2.2.2.1
> --dport 80 -j DNAT --to 192.168.100.4:80
> 
> When I tried to access 2.2.2.1 via Squid, it display
> this error message below :-
> 
> ERROR
> The requested URL could not be retrieved
> 
> ------------------------------------------------------
> 
> While trying to retrieve the URL: http://2.2.2.1/test/
> 
> The following error was encountered:
> 
> Connection Failed
> The system returned:
> 
>     (111) Connection refused
> The remote host or network may be down. Please try the
> request again.
> 
> Rgds,
> Siew
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com

Reply via email to