[GH-ISSUE #140] Configure VPN to go through proxy #126

Closed
opened 2026-03-02 07:27:57 +03:00 by kerem · 4 comments
Owner

Originally created by @kennyparsons on GitHub (Apr 19, 2019).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/140

@hwdsl2 I have not been able to find any info on how to configure the vpn to go through a proxy. I am running a proxy container to log my traffic, and I'm using your vpn docker to bring in all my traffic. So far, your container is working perfectly, just hitting a road block on this proxy part.

How can I accomplish this?

Originally created by @kennyparsons on GitHub (Apr 19, 2019). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/140 @hwdsl2 I have not been able to find any info on how to configure the vpn to go through a proxy. I am running a proxy container to log my traffic, and I'm using your vpn docker to bring in all my traffic. So far, your container is working perfectly, just hitting a road block on this proxy part. How can I accomplish this?
kerem closed this issue 2026-03-02 07:27:57 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Apr 19, 2019):

@kennyparsons Hello! Due to the Docker architecture, it is difficult to forward traffic between containers (the proxy in your use case). You may use the "host" network mode (refer to #133) to get around this restriction, however that mode is not recommended for this Docker image, because it modifies the IPTables rules on your Docker host, instead of IPTables rules in the container.

To actually forward the traffic to the proxy, you can try IPTables FORWARD and/or NAT rules. For details, please ask on the Libreswan/strongSwan users mailing list or the Docker community.

<!-- gh-comment-id:484999519 --> @hwdsl2 commented on GitHub (Apr 19, 2019): @kennyparsons Hello! Due to the Docker architecture, it is difficult to forward traffic between containers (the proxy in your use case). You may use the "host" network mode (refer to #133) to get around this restriction, however that mode is not recommended for this Docker image, because it modifies the IPTables rules on your Docker host, instead of IPTables rules in the container. To actually forward the traffic to the proxy, you can try IPTables FORWARD and/or NAT rules. For details, please ask on the Libreswan/strongSwan users mailing list or the Docker community.
Author
Owner

@kennyparsons commented on GitHub (Apr 19, 2019):

@hwdsl2 would it be possible to build my own image with your docker image and a proxy image all in one container?

<!-- gh-comment-id:485002641 --> @kennyparsons commented on GitHub (Apr 19, 2019): @hwdsl2 would it be possible to build my own image with your docker image and a proxy image all in one container?
Author
Owner

@hwdsl2 commented on GitHub (Apr 19, 2019):

@kennyparsons Yes, please refer to: https://github.com/hwdsl2/docker-ipsec-vpn-server#build-from-source-code

<!-- gh-comment-id:485010221 --> @hwdsl2 commented on GitHub (Apr 19, 2019): @kennyparsons Yes, please refer to: https://github.com/hwdsl2/docker-ipsec-vpn-server#build-from-source-code
Author
Owner

@kennyparsons commented on GitHub (Apr 19, 2019):

Thank you for the quick responses!

<!-- gh-comment-id:485010677 --> @kennyparsons commented on GitHub (Apr 19, 2019): Thank you for the quick responses!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-ipsec-vpn-server#126
No description provided.