LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2008, 05:27 AM   #1
omidm
LQ Newbie
 
Registered: Dec 2008
Distribution: Ubuntu 9.04 (nightly)
Posts: 14

Rep: Reputation: 0
iptables + squid cannot serve https requests


Hi all,

Installed a squid on a remote server and an iptables on local and add two rules in iptables:

iptables -t nat -A PREROUTING -s ! [squid-server] -d 0.0.0.0/0 -p tcp --dport 443 -i br0 -j DNAT --to-destination [squid-server]:3128
iptables -t nat -A PREROUTING -s ! [squid-server] -d 0.0.0.0/0 -p tcp --dport 80 -i br0 -j DNAT --to-destination [squid-server]:3128

In this situation all http requests served but https requests failed. And when directly connected to squid it was OK and can serve https requests.

And Firefox returned "ssl_error_rx_record_too_long" error.

Thanks.
 
Old 12-23-2008, 01:49 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
Seeing as you are using a bridge device you may want to look into using ebtables:

http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html
 
Old 12-31-2008, 07:46 AM   #3
omidm
LQ Newbie
 
Registered: Dec 2008
Distribution: Ubuntu 9.04 (nightly)
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks Ken,

Followed your link and find I can do this by bridging two ethernet cards.
The problem is that I have only one ethernet network on my remote server.

Can I create a virtual interface and bridge them? (one for input and one for output)!
How can I solve this issue?

Thanks a lot.
 
Old 01-05-2009, 07:36 AM   #4
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
Virtual with bridge

I'm not sure if you can create a virtual interface for bridging.

Why not put another network card in there they cost like 10 bucks?
 
Old 01-07-2009, 02:04 PM   #5
omidm
LQ Newbie
 
Registered: Dec 2008
Distribution: Ubuntu 9.04 (nightly)
Posts: 14

Original Poster
Rep: Reputation: 0
Because I don't have local access to that computer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse squid: only serve pages/files from cache brianmcgee Linux - Server 0 11-24-2008 09:15 AM
How can I block HTTPS packets with iptables/Squid? sanjee Linux - Security 5 10-29-2008 04:52 PM
iptables rule for ftp and https through squid gr8paki Linux - Networking 1 09-12-2008 08:53 PM
Using Squid and Apache in order to better serve pages xbaez Linux - Networking 2 04-07-2004 05:26 PM
Squid Proxy starts, but will not serve pages Kaniaz Linux - Software 5 03-29-2004 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration