Re: HTTP SERVER ON FORWARDED MACHINE

From: JoeAley2003 (joealey2003_at_yahoo.com)
Date: 08/24/04


Date: 24 Aug 2004 09:53:55 -0700

John-Paul Stewart <jpstewart@binaryfoundry.ca> wrote in message news:<d4bdgc.jgf.ln@mail.binaryfoundry.ca>...
> 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 <local-ip-address>
>
> iptables -t nat -A POSTROUTING -o $IFACE_INTERNET \
> -s <local-ip-address> -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.



Relevant Pages

  • Re: HTTP SERVER ON FORWARDED MACHINE
    ... >> receives internet forwarded from the linux. ... >> What i need is to run a valid on internet http server on this ... They're based on my setup where externally visible machines ... > address of the machine running iptables. ...
    (comp.os.linux.misc)
  • Re: HTTP SERVER ON FORWARDED MACHINE
    ... >> receives internet forwarded from the linux. ... >> What i need is to run a valid on internet http server on this ... They're based on my setup where externally visible machines ... > address of the machine running iptables. ...
    (comp.os.linux)
  • Re: HTTP SERVER ON FORWARDED MACHINE
    ... >> receives internet forwarded from the linux. ... >> What i need is to run a valid on internet http server on this ... They're based on my setup where externally visible machines ... > address of the machine running iptables. ...
    (comp.os.linux.networking)