Created
January 14, 2018 23:12
-
-
Save tyilo/03889ddc651fcf96e1208b65bfc7aa7f to your computer and use it in GitHub Desktop.
docker: ipsec vpn server + mitmproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
vpn: | |
image: hwdsl2/ipsec-vpn-server | |
env_file: | |
- ./vpn.env | |
ports: | |
- "500:500/udp" | |
- "4500:4500/udp" | |
privileged: true | |
hostname: ipsec-vpn-server | |
container_name: ipsec-vpn-server | |
volumes: | |
- /lib/modules:/lib/modules:ro | |
command: > | |
bash -c ' | |
HOST=$$(host -4 mitmproxy | head -1 | awk "{ print \$$4 }") && | |
echo "HOST: $$HOST" && | |
iptables -t nat -A PREROUTING -i eth+ -p tcp --destination-port 80 -j DNAT --to-destination $$HOST:8080 && | |
iptables -t nat -A PREROUTING -i eth+ -p tcp --destination-port 443 -j DNAT --to-destination $$HOST:8080 && | |
/opt/src/run.sh | |
' | |
mitmproxy: | |
image: mitmproxy/mitmproxy | |
ports: | |
- "8080:8080/tcp" | |
hostname: mitmproxy | |
container_name: mitmproxy | |
command: mitmdump -T --host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define your own values for these variables | |
# - DO NOT put "" or '' around values, or add space around = | |
# - DO NOT use these special characters within values: \ " ' | |
VPN_IPSEC_PSK=foobar | |
VPN_USER=foo | |
VPN_PASSWORD=bar |
Using this creates a recursive request loop, where it keeps trying to loop through mitmproxy to make the request.
Any idea on how to stop this from happening? I'm at wits end.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
user,passwd...