[GH-ISSUE #353] Cannot connect to any host on Android with StrongSwan #327

Closed
opened 2026-03-02 08:01:23 +03:00 by kerem · 3 comments
Owner

Originally created by @ArchiDevil on GitHub (Mar 5, 2023).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/353

Checklist

Describe the issue
When I connect to the server via StrongSwan I cannot open any site.
Tried it on multiple VPS and multiple Android devices.

To Reproduce
Steps to reproduce the behavior:

  1. Install VPN server to your VPS
  2. Set up StrongSwan using the guide here (by importing configuration from .sswan file)
  3. Connect to VPN
  4. Try to open any website.

Expected behavior
Sites should be opened and applications should connect.

Server (please complete the following information)

  • Docker host OS: Debian 11
  • Hosting provider (if applicable): Multiple

Client (please complete the following information)

  • Device: Multiple devices
  • OS: Android 11
  • VPN mode: IKEv2

Additional context
Logs from StrongSwan are here:
charon.log

It works as expected if I use IPsec/L2TP auth.

Originally created by @ArchiDevil on GitHub (Mar 5, 2023). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/353 **Checklist** - [x] I read the [README](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md) - [x] I read the [Important notes](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md#important-notes) - [x] I followed instructions to [configure VPN clients](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md#next-steps) - [x] I checked [IKEv1 troubleshooting](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#ikev1-troubleshooting), [IKEv2 troubleshooting](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto.md#ikev2-troubleshooting), [enabled logs](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#enable-libreswan-logs) and checked [VPN status](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#check-logs-and-vpn-status) - [x] I searched existing [Issues](https://github.com/hwdsl2/docker-ipsec-vpn-server/issues?q=is%3Aissue) - [ ] This bug is about the IPsec VPN server Docker image, and not IPsec VPN itself (UNKNOWN) **Describe the issue** When I connect to the server via StrongSwan I cannot open any site. Tried it on multiple VPS and multiple Android devices. **To Reproduce** Steps to reproduce the behavior: 1. Install VPN server to your VPS 2. Set up StrongSwan using the guide here (by importing configuration from `.sswan` file) 3. Connect to VPN 4. Try to open any website. **Expected behavior** Sites should be opened and applications should connect. **Server (please complete the following information)** - Docker host OS: Debian 11 - Hosting provider (if applicable): Multiple **Client (please complete the following information)** - Device: Multiple devices - OS: Android 11 - VPN mode: IKEv2 **Additional context** Logs from StrongSwan are here: [charon.log](https://github.com/hwdsl2/docker-ipsec-vpn-server/files/10891594/charon.log) It works as expected if I use IPsec/L2TP auth.
kerem closed this issue 2026-03-02 08:01:24 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Mar 6, 2023):

@ArchiDevil Hello! Thanks for reporting this issue. I tested this use case (Android using strongSwan VPN client and IKEv2 mode) and it worked fine.

Your strongSwan logs look normal. Because you tried multiple Android devices and multiple hosting providers, and observed the same issue, I suspect that the issue may be with your home router (if applicable). Try connecting via cellular (4G/5G) and see if the VPN works fine. If so, the issue may be with your router.

For additional troubleshooting information please see:
https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto.md#cannot-open-websites-after-connecting-to-ikev2

You can also try setting up the VPN directly on a new server without Docker.

<!-- gh-comment-id:1455446456 --> @hwdsl2 commented on GitHub (Mar 6, 2023): @ArchiDevil Hello! Thanks for reporting this issue. I tested this use case (Android using strongSwan VPN client and IKEv2 mode) and it worked fine. Your strongSwan logs look normal. Because you tried multiple Android devices and multiple hosting providers, and observed the same issue, I suspect that the issue may be with your home router (if applicable). Try connecting via cellular (4G/5G) and see if the VPN works fine. If so, the issue may be with your router. For additional troubleshooting information please see: https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto.md#cannot-open-websites-after-connecting-to-ikev2 You can also try [setting up the VPN directly on a new server](https://github.com/hwdsl2/setup-ipsec-vpn) without Docker.
Author
Owner

@ArchiDevil commented on GitHub (Mar 9, 2023):

I tried everything from these instructions, of course. Nothing helped. How can I debug the issue? It seems like traffic from my device is not routed, but iptables output looks fine. What can I do to find the issue?

<!-- gh-comment-id:1462375271 --> @ArchiDevil commented on GitHub (Mar 9, 2023): I tried everything from these instructions, of course. Nothing helped. How can I debug the issue? It seems like traffic from my device is not routed, but iptables output looks fine. What can I do to find the issue?
Author
Owner

@hwdsl2 commented on GitHub (Mar 12, 2023):

@ArchiDevil Try connecting via cellular (4G/5G) and see if the VPN works fine. If so, the issue may be with your router. To check whether it's a DNS issue (unlikely), try visiting e.g. https://1.1.1.1 after connecting to the VPN.

For further troubleshooting, you may enable and check Libreswan (IPsec) logs on the server, see Enable Libreswan logs.

<!-- gh-comment-id:1465273024 --> @hwdsl2 commented on GitHub (Mar 12, 2023): @ArchiDevil Try connecting via cellular (4G/5G) and see if the VPN works fine. If so, the issue may be with your router. To check whether it's a DNS issue (unlikely), try visiting e.g. https://1.1.1.1 after connecting to the VPN. For further troubleshooting, you may enable and check Libreswan (IPsec) logs on the server, see [Enable Libreswan logs](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#enable-libreswan-logs).
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#327
No description provided.