nearform
nearform / aws-proxy-pattern Goto Github PK
View Code? Open in Web Editor NEWTerraform module to create a transparent proxy within AWS
License: Other
Terraform module to create a transparent proxy within AWS
License: Other
Thanks for posting this... It appears that he squid configuration allows everything https through. I was able to resolve by:
#ssl_bump terminate step3 all
ssl_bump terminate all
Using squid-3.5.20 on amazon linux 2
Hello, i run your configuration on Centos7, and have this error:
$docker logs great_hopper
2020/05/01 07:35:11| ERROR: No forward-proxy ports configured.
2020/05/01 07:35:11| ERROR: No forward-proxy ports configured.
2020/05/01 07:35:11| ERROR: No forward-proxy ports configured.
2020/05/01 07:35:11| ERROR: No forward-proxy ports configured.
2020/05/01 07:35:11| ERROR: No forward-proxy ports configured.
2020/05/01 07:35:11| Finished loading MIME types and icons.
2020/05/01 07:35:11| HTCP Disabled.
2020/05/01 07:35:11| Squid plugin modules loaded: 0
2020/05/01 07:35:11| Adaptation support is off.
2020/05/01 07:35:11| Accepting NAT intercepted HTTP Socket connections at local=0.0.0.0:3129 remote=[::] FD 13 flags=41
2020/05/01 07:35:11| Accepting NAT intercepted SSL bumped HTTPS Socket connections at local=0.0.0.0:3130 remote=[::] FD 14 flags=41
2020/05/01 07:35:12| storeLateRelease: released 0 objects
In AWS (frankfurt) i use ami-05788af9005ef9a93.
My docker-ce verstion 19.03.8
My iptables rules:
# iptables-save
# Generated by iptables-save v1.4.21 on Fri May 1 08:00:06 2020
*filter
:INPUT ACCEPT [1291:94443]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [870:435793]
:DOCKER - [0:0]
:DOCKER-ISOLATION-STAGE-1 - [0:0]
:DOCKER-ISOLATION-STAGE-2 - [0:0]
:DOCKER-USER - [0:0]
-A FORWARD -j DOCKER-USER
-A FORWARD -j DOCKER-ISOLATION-STAGE-1
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
-A DOCKER-ISOLATION-STAGE-2 -j RETURN
-A DOCKER-USER -j RETURN
COMMIT
# Completed on Fri May 1 08:00:06 2020
# Generated by iptables-save v1.4.21 on Fri May 1 08:00:06 2020
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [8:480]
:OUTPUT ACCEPT [39:3228]
:POSTROUTING ACCEPT [39:3228]
:DOCKER - [0:0]
-A PREROUTING -s 10.0.0.0/16 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 3130
-A PREROUTING -s 10.0.0.0/16 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3129
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A DOCKER -i docker0 -j RETURN
COMMIT
# Completed on Fri May 1 08:00:06 2020
Squid config:
# cat /etc/squid/squid.conf
visible_hostname squid
#Handling HTTP requests
http_port 3129 intercept
acl allowed_http_sites dstdomain .amazonaws.com
acl allowed_http_sites dstdomain .security.ubuntu.com
http_access allow allowed_http_sites
#Handling HTTPS requests
https_port 3130 cert=/etc/squid/ssl/squid.pem ssl-bump intercept
acl SSL_port port 443
http_access allow SSL_port
acl allowed_https_sites ssl::server_name .amazonaws.com
acl allowed_https_sites ssl::server_name .badssl.com
acl allowed_https_sites ssl::server_name .security.ubuntu.com
acl step1 at_step SslBump1
acl step2 at_step SslBump2
acl step3 at_step SslBump3
ssl_bump peek step1 all
ssl_bump peek step2 allowed_https_sites
ssl_bump splice step3 allowed_https_sites
ssl_bump terminate step3 all
http_access deny all
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.