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

Script utility to check public routability of udp/tcp ports #25

Open
easye opened this issue Sep 24, 2024 · 2 comments
Open

Script utility to check public routability of udp/tcp ports #25

easye opened this issue Sep 24, 2024 · 2 comments

Comments

@easye
Copy link
Contributor

easye commented Sep 24, 2024

Use Case

Operators often have local browsers going through VPN, proxies etc. They are really interested if the "user on the command line" has access, rather than if they can visit a given site on the web.

Prototype: Linux Bourne shell script with minimal pkg adds

With something like nc installed, we can handle checking the UDP traffic as well.

@easye easye changed the title Script utility to check udp/tcp port access Script utility to check public routability of udp/tcp ports Sep 24, 2024
@easye
Copy link
Contributor Author

easye commented Sep 25, 2024

For the right ip "reflection" service, nc might be part of a solution, but it seems better to use some of the nicely hosted free services around. For instance

curl ifconfig.co/port/8080 

will return a true/false response for the public routability of packets to 8080 locally.

The code for ifconfig.co is supposedly Open Source https://github.com/mpolden/echoip, so we could potentially modify for UDP ports, if we were willing to host somewhere.

@veaceslavdoina
Copy link
Contributor

veaceslavdoina commented Oct 2, 2024

We discussed a way to implement something like

  • port.codex.storage/tcp/8070
  • port.codex.storage/udp/8090

So, people can check their port availability. For TCP it can be implemented not so hard but for UDP nc will not work most probably:
man nc

CAVEATS
UDP port scans will always succeed (i.e. report the port as open), rendering the -uz combination of flags relatively useless.

nc -uz 1.1.1.1 22222
Connection to 1.1.1.1 22222 port [udp/*] succeeded!

And we started to think about something like "DHT pinger".

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

No branches or pull requests

2 participants