Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-19-2006, 04:03 AM
|
#1
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Rep:
|
Redirecting request to port 443 to directly access the internet
Hi,
It seems that implementing transparent squid proxy will cause https & ssl to not work well on browsers ...
I'd like to be able to redirect all other requests like https/ssl(port 443) or email client's ports to directly access the internet instead of going through our proxy server.
Here's a little diagram of our network:
http://static.flickr.com/49/149174815_48fa51f1a3_o.png
What I did so far is:
1. Block out all connection request from our router settings except for our proxy server (adminserver ) only, this will force our users to use the proxy settings for their other applications.
2. Set all client's pc's to use the gateway 'adminserver'.
3. Setup transparent proxy for squid. For http requests.
Everything else is working fine so far, except that opening up ssl-enabled sites (mail.yahoo.com) creates a timeout error and email clients seems to not work even with proxy settings enabled.
What I need is some sort of iptable rule to grab all port 443 connections and make it connect directly to the internet ... I used webmin to formulate a rule but that didn't work (I have little knowledge of iptables as of the moment) ... so I thought of asking for help here, anyone?
Here's my current rule:
-A PREROUTING -p tcp -m tcp -i eth0 --dport 443 -j DNAT --to-destination 192.168.100.3
Last edited by Elijah; 05-19-2006 at 04:07 AM.
|
|
|
|
05-19-2006, 04:28 AM
|
#2
|
|
LQ Newbie
Registered: Nov 2005
Posts: 9
Rep:
|
If you block all access from your router, except for proxy server, and all your PCs are set up to use your proxy server you don't need any transparent proxy: the proxy server is able to manage https requests.
Using transparent proxy to redirect https trafic is not the right thing: https direct requests are quite different from https proxy requests.
|
|
|
|
05-19-2006, 04:42 AM
|
#3
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Original Poster
Rep:
|
The reason for it is that there are quite a few pc's to setup proxy settings for. I didn't want to bother our users as often ;-)
Quote:
|
Using transparent proxy to redirect https trafic is not the right thing: https direct requests are quite different from https proxy requests.
|
I actually don't plan to proxy any https request, just forward it to a direct connection instead... only http will be proxy-ed, will that be a problem?
|
|
|
|
05-19-2006, 04:45 AM
|
#4
|
|
LQ Newbie
Registered: Nov 2005
Posts: 9
Rep:
|
It won't be a problem:
- remove the DNAT rule for https protocol
- open ports on your router
|
|
|
|
05-19-2006, 05:00 AM
|
#5
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Original Poster
Rep:
|
Ok, removed dnat:
-A PREROUTING -p tcp -m tcp -i eth0 --dport 443 -j ACCEPT
Didn't work :-( , edit: we only have a dsl router so I guess all ports are open ...
Last edited by Elijah; 05-19-2006 at 05:13 AM.
|
|
|
|
05-19-2006, 05:07 AM
|
#6
|
|
LQ Newbie
Registered: Nov 2005
Posts: 9
Rep:
|
Quote:
|
Originally Posted by Elijah
Ok, removed dnat:
-A PREROUTING -p tcp -m tcp -i eth0 --dport 443 -j ACCEPT
|
This should be a FORWARD rule instead of a PREROUTING rule.
|
|
|
|
05-19-2006, 05:38 AM
|
#7
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Original Poster
Rep:
|
Can't seem to get a connection...
Tried in all filter, mangle & nat tables
# https / ssl direct connection
-A FORWARD -p tcp -m tcp -i eth0 --dport 443 -j ACCEPT
Last edited by Elijah; 05-19-2006 at 06:05 AM.
|
|
|
|
05-19-2006, 08:16 AM
|
#8
|
|
LQ Newbie
Registered: Nov 2005
Posts: 9
Rep:
|
I was looking at your net diagram...
If your workstations use the router as default gateway, the forwarding rules of the Adminserver are useless for your LAN trafic... so the problem is in your router ACLs.
|
|
|
|
05-20-2006, 09:07 PM
|
#9
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Original Poster
Rep:
|
hmm.. not really, our dhcp setup is currently pointing to squid server (adminserver) as the default gateway instead of the router. I can see that it's working because transparent proxying is working well =) except for https that is...
|
|
|
|
05-23-2006, 01:00 AM
|
#10
|
|
Member
Registered: Feb 2003
Location: Philippines
Distribution: Debian, Mandrake, Redhat
Posts: 90
Original Poster
Rep:
|
Nevermind, solved it. Setted up a new iptable rule :
-A POSTROUTING -p tcp -m tcp --dport 443 -j SNAT --to 192.168.100.2
Thanks for the help though.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:53 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|