Subj : Re: HTTP SERVER ON FORWARDED MACHINE To : comp.os.linux.networking,comp.os.linux,comp.os.linux.redhat,comp.os.linux.security,comp.os.linux.misc From : joealey2003 Date : Tue Aug 24 2004 10:53 am John-Paul Stewart wrote in message news:... > JoeAley2003 wrote: > > Hi all... > > > > > > I have a redhat linux 9 connected to the internet and 1 computer that > > receives internet forwarded from the linux. > > > > What i need is to run a valid on internet http server on this > > forwarded computer where i run apache on port 80. > > Use these as a starting point: > > iptables -A FORWARD -s 0.0.0.0/0 -d $IP_INTERNET -p tcp \ > --destination-port 80 -j ACCEPT > > iptables -t nat -A PREROUTING -d $IP_INTERNET -j DNAT \ > --to-destination > > iptables -t nat -A POSTROUTING -o $IFACE_INTERNET \ > -s -j SNAT --to-source $IP_INTERNET > > Those will almost certainly need some modification to suit your > situation. They're based on my setup where externally visible machines > get 1-1 NATed, since I have more than one publically visible IP address. > But the idea should get you started. Note that local-ip-address > refers to the address of the machine running Apache, *not* the local > address of the machine running iptables. Thank you for your reply but those command lines doesn't work. Unfortunatly, i did not undertand the "0.0.0.0/0". Iptables accept all these command lines but, when i request http://IP_INTERNET from an internet machine, it doesn't work. .