Created
January 14, 2018 23:12
-
-
Save tyilo/03889ddc651fcf96e1208b65bfc7aa7f to your computer and use it in GitHub Desktop.
Revisions
-
tyilo created this gist
Jan 14, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ 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 hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # 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