LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] iptables and local http

[ILUG] iptables and local http

Colin O'Keeffe ilugcolin at gmail.com
Sun Apr 29 13:13:39 IST 2007


Hi

Heres my setup,

Debian ( 192.168.0.5 )  box acting as transparent proxy (squid , http = 3128
) on the network, so all clients gatways are set to the linux box and it
forwards everything to the router, 192.168.0.1

I;m also running apache on the box , currently port 8080, but i'd like to
have it on port 80. So, can iptables detect a http request for the linux box
and pass the request to apache and anything that doesnt have an ultimate
destination of the linux box be passed through the proxy.?? How do I do it?

Heres my iptable commands run at boot..

# Generated by iptables-save v1.3.3 on Fri Mar  9 15:10:22 2007
*nat
:PREROUTING ACCEPT [789:70588]
:POSTROUTING ACCEPT [95:9266]
:OUTPUT ACCEPT [143:12598]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri Mar  9 15:10:22 2007



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell