[GH-ISSUE #15] Why not write sha2-truncbug=yes in run.sh? #14

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

Originally created by @hwdsl2 on GitHub (Dec 20, 2016).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/15

Originally posted by @cncolder:

/opt/src/run.sh will rewrite /etc/ipsec.conf after restart docker. I must edit every time.
I think it's good to move it from troubleshoot into /opt/src/run.sh

I setup -v ./ipsec.conf:/etc/ipsec.conf now. But I found there are some dynamic ip addresses in gen script.

Originally created by @hwdsl2 on GitHub (Dec 20, 2016). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/15 Originally posted by @cncolder: `/opt/src/run.sh` will rewrite `/etc/ipsec.conf` after restart docker. I must edit every time. I think it's good to move it from troubleshoot into `/opt/src/run.sh` I setup `-v ./ipsec.conf:/etc/ipsec.conf` now. But I found there are some dynamic ip addresses in gen script.
kerem closed this issue 2026-03-02 07:11:03 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Dec 20, 2016):

@cncolder Hello! Thanks for the suggestion. However, adding the sha2-truncbug line might break compatibility with some devices.

For this issue, please try the following workaround:

Start a Bash session in the running container and install nano:

docker exec -it ipsec-vpn-server env TERM=xterm bash -l
apt-get update && apt-get install nano

Then edit /opt/src/run.sh and add the sha2-truncbug=yes line, indented by two spaces:

nano -w /opt/src/run.sh
[Edit the file and exit nano]

You may also comment out sections or make other changes if needed. When finished, run exit to return to your Docker host. The next time you restart your container, /etc/ipsec.conf will contain these changes.

<!-- gh-comment-id:268306670 --> @hwdsl2 commented on GitHub (Dec 20, 2016): @cncolder Hello! Thanks for the suggestion. However, adding the `sha2-truncbug` line might break compatibility with some devices. For this issue, please try the following workaround: Start a Bash session in the running container and install `nano`: ``` docker exec -it ipsec-vpn-server env TERM=xterm bash -l apt-get update && apt-get install nano ``` Then edit `/opt/src/run.sh` and add the `sha2-truncbug=yes` line, indented by two spaces: ``` nano -w /opt/src/run.sh [Edit the file and exit nano] ``` You may also comment out sections or make other changes if needed. When finished, run `exit` to return to your Docker host. The next time you restart your container, `/etc/ipsec.conf` will contain these changes.
Author
Owner

@cncolder commented on GitHub (Dec 21, 2016):

Thank you for your answer.
I solve it. I copy run.sh outside then mount volume.

docker cp ipsec-vpn-server:/opt/src/run.sh ./
docker run ... -v /path/to/run.sh:/opt/src/run.sh:ro ...
<!-- gh-comment-id:268420496 --> @cncolder commented on GitHub (Dec 21, 2016): Thank you for your answer. I solve it. I copy `run.sh` outside then mount volume. docker cp ipsec-vpn-server:/opt/src/run.sh ./ docker run ... -v /path/to/run.sh:/opt/src/run.sh:ro ...
Author
Owner

@hwdsl2 commented on GitHub (Jan 4, 2017):

@cncolder Just want to let you know that the sha2-truncbug=yes line has been added back to run.sh, to fix the VPN on Android 6 and 7. Thanks for reminding me on this.

<!-- gh-comment-id:270300568 --> @hwdsl2 commented on GitHub (Jan 4, 2017): @cncolder Just want to let you know that the `sha2-truncbug=yes` line has been added back to `run.sh`, to fix the VPN on Android 6 and 7. Thanks for reminding me on this.
Author
Owner

@cncolder commented on GitHub (Jan 4, 2017):

@hwdsl2 Thank you. Its save my life.

<!-- gh-comment-id:270301138 --> @cncolder commented on GitHub (Jan 4, 2017): @hwdsl2 Thank you. Its save my life.
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#14
No description provided.