I have been trying unsuccessfully to get e2guardian running with sslmitm.
I download the source and have successfully installed V 3.4.0.1 on OpenBSD current (5.9 - about 3-4 weeks old).
I am not going to post extensive configuration files, because I don't know exactly what would be most helpful. But I will try to give (what seems to me) relevant details.
I already have squid 3.5 running will ssl-bump; and am using c-icap from within squid for AV scanning (with clamav) and simple banned site url scanning.
I have installed e2guardian between the client and squid, and e2guardian is using squid as its parent proxy.
After install and config, e2guardian does start as expected. From a browser explicitly directed to e2guardian, I see:
http://internal.test.e2guardian.org --> "e2guardian internal test OK"
Also, it seems to be working filtering/content scanning with http connections.
For example, if I use a non-ssl http connection to "google.com" (that is, a non-encrypted connection from the client to the proxy), and try a "naughty" search (e.g. "xxx porn sex"); e2guardian intercepts the search and returns the default block page ("reporting level = 3" set in e2guardianf3.conf).
I also see the DENIED attempt logged in access.log as (log entry has been "sanitized" a bit):
date time user ip http://www.google.com/search?ie=ISO-8859-1&hl=en&source=hp&biw=&bih=&q=xxx+porn+sex&gbv=2&oq=xxx+porn+sex&gs_l=heirloom-hp.3...3449.6067.0.6324.14.4.1.9.10.0.107.384.3j1.4.0....0...1ac.1.34.heirloom-hp..10.4.383.mNeHZdACVvk *DENIED* Banned pattern matched URL: (PATTERNS)+.*(PATTERNS)s? GET 0 0 Banned Regular Expression URLs 3 403 - FilterGroup - -
But, if I change the request to https (now, its an ssl connection from the client browser to the proxy), the request goes through and I get the google search result page.
In this case, there is nothing logged in the e2guardian access.log file. In addition, the ssl certificate being presented to the client is NOT the certificate from e2guardian, but a certificate signed by squid ssl-bump.
Finally, there is no indication that e2guardian is trying to produce a sslmitm certificate, as the 'generatedcertpath' remains completely empty.
I followed the information at e2guardian/notes/ssl_mitm to set up ssl_mitm.
Specifically:
openssl genrsa 4096 > /etc/e2guardian/ssl_cert/test_root_key.pem
openssl req -new -x509 -days 3650 -key /etc/e2guardian/ssl_cert/test_root_key.pem -out /etc/e2guardian/ssl_cert/test_root_CA.crt
openssl genrsa 4096 > /etc/e2guardian/ssl_cert/test_private_cert.pem
For testing, i have made the permissions wide open on these files:
# ls -lah /etc/e2guardian/ssl_cert
-rwxrwxrwx 1 _e2guardian _e2guardian 3.2K Feb 25 09:21 test_private_cert.pem
-rwxrwxrwx 1 _e2guardian _e2guardian 1.9K Feb 25 09:19 test_root_CA.crt
-rwxrwxrwx 1 _e2guardian _e2guardian 3.2K Feb 25 09:18 test_root_key.pem
Similarly, the premssions for 'generatedcertpath' is wide open:
# ls -lah /var/e2guardian/generated_certs/
drwxrwxrwx 2 _e2guardian _e2guardian 512B Feb 16 13:22 .
drwxrwxrwx 3 _e2guardian _e2guardian 512B Feb 16 13:22 ..
I setup e2guardian.conf with:
# cat e2guardian.conf | grep ssl | grep -v ^# | grep -v ^$
reverseaddresslookups = off
logsslerrors = off
cacertificatepath = '/etc/e2guardian/ssl_cert/test_root_CA.crt'
caprivatekeypath = '/etc/e2guardian/ssl_cert/test_root_key.pem'
certprivatekeypath = '/etc/e2guardian/ssl_cert/test_private_cert.pem'
and:
generatedcertpath = '/var/e2guardian/generated_certs'
And e2guardianf3.conf with:
# cat e2guardianf3.conf | grep ssl | grep -v ^# | grep -v ^$
ssllegacylogic = off
bannedsslsitelist = '/etc/e2guardian/lists/bannedsslsitelist'
greysslsitelist = '/etc/e2guardian/lists/greysslsitelist'
naughtynesslimit = 50
sslsiteregexplist = '/etc/e2guardian/lists/sslsiteregexplist'
sslcertcheck = off
sslmitm = on
onlymitmsslgrey = off
It appears the e2guardian is just passing the https connection through to squid without decrypting/re-encrypting, despite "sslmitm = on" being set.
I have been trying to figure this out for several days without success. Am I missing something obvious?
Thanks in advance for any advice.
Ted
I'm also trying to make SSL MITM work with no luck...
I've followed the guide in notes/sslmitm on GitHub:
- compiled with e2guardian with '--enable-sslmitm=yes' (confirmed by e2guardian -v)
- Generated certs and keys:
openssl genrsa 4096 > /etc/e2guardian/certs/private_root.pem
openssl req -new -x509 -days 3650 -key /etc/e2guardian/certs/private_root.pem -out /etc/e2guardian/certs/my_rootCA.crt
openssl x509 -in /etc/e2guardian/certs/my_rootCA.crt -outform DER -out /etc/e2guardian/certs/my_rootCA.der
openssl genrsa 4096 > /etc/e2guardian/certs/private_cert.pem
- Created a directory for generated certs :
mkdir -p /etc/e2guardian/generatedcerts
chown e2guardian:e2guardian /etc/e2guardian/generatedcerts
- Made these changes in e2guardian.conf :
sslcertificatepath = '/etc/ssl/certs/'
cacertificatepath = '/etc/e2guardian/certs/my_rootCA.crt'
caprivatekeypath = '/etc/e2guardian/certs/private_root.pem'
certprivatekeypath = '/etc/e2guardian/certs/private_cert.pem'
generatedcertpath = '/etc/e2guardian/generatedcerts/'
- Made these changes in e2guardianf1.conf :
ssllegacylogic = off
sslmitm = on
So frustrating!
--
You received this message because you are subscribed to the Google Groups "e2guardian" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e2guardian+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I've fixed my problem...
I just forgot to redirect traffic to port 443 to 8080 in my NAT PREROUTING table just like I was doing for port 80!
Sorry for bothering... I just hope this can help someone.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
Dear D Lu,is there any reason why you cannot upgrade to a more recent version? *a lot* of work has been put in to fix many bugs and there may be no way to work around this in 3.4.0.1 .best,Spike
On Wed, Nov 15, 2017 at 9:56 PM D Lu <dnludovice@bluewave-innovations.com> wrote:
Hi i have the same problem as them, firefox returns this error whenever I go to https sites or search the webError code: SSL_ERROR_RX_RECORD_TOO_LONGI have the same configuration as cool34000
--
You received this message because you are subscribed to the Google Groups "e2guardian" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e2guardian+unsubscribe@googlegroups.com.