Re: internal web server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>- external ip of firewall 202.138.128.xxx
>- internal ip of firewall 192.168.247.3
>- internal web server with ip 192.168.247.5
>
>This was what my code was...
>$IPT -t nat -A PREROUTING -p tcp -d 192.168.247.3 --dport 80 -j DNAT
> --to-destination 192.168.247.5:80
>
>It doesn't seem to work. I have set the web server to use the gw of
> 192.168.247.3

Not really sure what you want, but if you try to write a rule for forwarding 
packets which destination Port 80 to your internal web server, try this 
one:

$IPT -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 
192.168.247.5:80

If you know your external fw-IP you can specify it in the rule:

$IPT -t nat -A PREROUTING -p tcp --dport 80 -d 202.138.128.xxx -j DNAT 
--to-destination 192.168.247.5:80


Greetings,

Thorsten Scherf,
RHCE, RHCX



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux