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

Re: Firewall protects, so what directs?



On Mon, Mar 18, 2002 at 10:20:46AM -0600, Thomas Cook did this all over the keyboard:
> Lets say my external ip is 1.2.3.4.  So someone on the internet plugs
> 1.2.3.4 in their browser.  The browser contacts my firewall's external
> interface asking for connect on port 80.  How do I tell my firewall to
> direct that www request to 1.2.3.4 into a request to 10.10.0.10 port 80 (my
> apache server)?

# iptables -t nat -A PREROUTING -i <ext.dev> -p tcp -d 1.2.3.4 --dport 80 \
	-j DNAT --to-destination 10.10.0.10:80

...would do the trick
http://netfilter.samba.org/ or 'man iptables' for more detailed info.

peace


-- 
  _
 / \
/   \   ASCII Ribbon Campain
\   /     against HTML in
 \ /       eMail & news
  X
 / \

Attachment: pgpR_ghoS5Slv.pgp
Description: PGP signature


Reply to: