Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router NAT settings can cause client reconnection issues #520

Closed
davidemyers opened this issue May 4, 2017 · 8 comments · Fixed by #1498
Closed

Router NAT settings can cause client reconnection issues #520

davidemyers opened this issue May 4, 2017 · 8 comments · Fixed by #1498

Comments

@davidemyers
Copy link
Contributor

Here's a description of an issue I've found written in a form suitable for the Troubleshooting document.

I have multiple devices and they have problems staying connected

Check your router’s NAT settings. In pfSense, NAT randomizes the source ports of outgoing connections. In order to accommodate IPsec clients whose IKE implementations don’t support NAT-T, pfSense exempts outgoing IKE connections (port 500) from randomization and keeps the source port static. This creates a limitation of only one current IKE negotiation at a time. Any subsequent attempt to create an IPsec connection fails until the firewall state created by the previous attempt expires (in about a minute).

pfSense users can avoid this issue by disabling the static port NAT exemption for IKE. In Outgoing NAT settings, switch to Manual Outbound NAT and disable the rule for traffic from your LAN address to port 500.

This issue is more likely to be seen by those with multiple iOS clients as they tend to attempt frequent reconnections when sleeping.

@lgg
Copy link

lgg commented May 6, 2017

I have the same issue.

But not clearly understand how to fix it.

@davidemyers
Copy link
Contributor Author

@lgg Do you use pfSense? I can post some screen shots of the NAT settings.

@Thermi
Copy link

Thermi commented May 6, 2017

It's a known issue and I refer to those routers as "broken routers". A lot of proprietary ones do this and it obviously causes problems.
The problem is, that the router can't distinguish what host in its LAN the packets are for, so it sends them all (and ESP) packets to just one host.

@jbwhaley
Copy link

So, is there anything that can be done to fix this, short of buying a pfSense router?

@davidemyers
Copy link
Contributor Author

If your router has a feature called "VPN Passthrough" or "IPsec Passthrough" try turning it off.

@iamvishnurajan
Copy link

Just wanted to say thank you for documenting this here. I had been struggling with this problem (multiple macOS/iOS clients + pfSense), and this appears to have fixed it.

@jackivanov
Copy link
Collaborator

@davidemyers Could you send a PR to cover this in the docs, please?

@jackivanov jackivanov removed this from the 1.1 milestone Jun 20, 2019
@davidemyers
Copy link
Contributor Author

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants