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

The webserver always gets remote IP address 0.0.0.0 #935

Closed
3 tasks
teusbenschop opened this issue Mar 9, 2024 · 0 comments
Closed
3 tasks

The webserver always gets remote IP address 0.0.0.0 #935

teusbenschop opened this issue Mar 9, 2024 · 0 comments

Comments

@teusbenschop
Copy link
Member

teusbenschop commented Mar 9, 2024

The code uses getpeername, and the resulting IP address is always 0.0.0.0.

A possible solution is here:

https://stackoverflow.com/questions/17220006/in-what-conditions-getpeername-returns-ipport-0-0-0-00

  • Check if the remote client uses IPv4 or IPv6.
  • Get the remote address suitable for that in both cases.
  • Use sslscan to see the logging include the IP address.
@teusbenschop teusbenschop changed the title Webserver always get remove IP address 0.0.0.0 Webserver always gets remote IP address 0.0.0.0 Mar 9, 2024
@teusbenschop teusbenschop changed the title Webserver always gets remote IP address 0.0.0.0 The webserver always gets remote IP address 0.0.0.0 Apr 12, 2024
@teusbenschop teusbenschop self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant