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

port mapping issue with nat behind nat #769

Closed
optman opened this issue Jan 13, 2020 · 1 comment · Fixed by #771
Closed

port mapping issue with nat behind nat #769

optman opened this issue Jan 13, 2020 · 1 comment · Fixed by #771
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@optman
Copy link
Contributor

optman commented Jan 13, 2020

I don't see any reason to use observed address instead of router WAN address here!

if manet.IsPublicAddr(mappedMaddr) {

// No. Ok, let's try our observed addresses.

If WAN address is not a public address, it will be a internal router in most case i think. If you use the outer router WAN address( the observed address) and internal router mapped port combination as listen address, it wouldn't work! Even worse, it will prevent the hosts behind the outer router to access the hosts behind the internal router.

It is not unusual NAT inside a big NAT. So please don't check WAN public addressable here, just use it, then all hosts behind the same big NAT will be happy connected, at least.

@optman optman added the kind/bug A bug in existing code (including security flaws) label Jan 13, 2020
@Stebalien
Copy link
Member

Stebalien commented Jan 14, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants