Re: HTTP SERVER ON FORWARDED MACHINE
From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 08/23/04
- Next message: Neil: "MySQL Security Risk?"
- Previous message: JoeAley2003: "HTTP SERVER ON FORWARDED MACHINE"
- In reply to: JoeAley2003: "HTTP SERVER ON FORWARDED MACHINE"
- Next in thread: JoeAley2003: "Re: HTTP SERVER ON FORWARDED MACHINE"
- Reply: JoeAley2003: "Re: HTTP SERVER ON FORWARDED MACHINE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 23 Aug 2004 13:56:27 -0400
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.
- Next message: Neil: "MySQL Security Risk?"
- Previous message: JoeAley2003: "HTTP SERVER ON FORWARDED MACHINE"
- In reply to: JoeAley2003: "HTTP SERVER ON FORWARDED MACHINE"
- Next in thread: JoeAley2003: "Re: HTTP SERVER ON FORWARDED MACHINE"
- Reply: JoeAley2003: "Re: HTTP SERVER ON FORWARDED MACHINE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|