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

[Question] Connecting to arbitrary port is always opened #162

Open
antenore opened this issue Apr 16, 2021 · 0 comments
Open

[Question] Connecting to arbitrary port is always opened #162

antenore opened this issue Apr 16, 2021 · 0 comments

Comments

@antenore
Copy link

antenore commented Apr 16, 2021

Thanks for this fork

I've a question I posted in the original redsocks, but I didn't get any answer

I'm doing something wrong or this is a normal behavior, and anyway sorry for the dumb question.

I've NAT rules like:

add rule ip nat REDSOCKS ip protocol tcp ip daddr 123.123.123.0/16 counter redirect to :10820

If I try to connect to an IP:PORT in the network 123.123.123.0/16 that is closed or filtered by a firewall, I still get the telnet prompt and I guess it's the socks5 proxy I'm using.

If I connect to a real working, not filtered, service, everything works as expected.

# Test to port 22 (SSH)
$ telnet 123.123.123.123 30
Trying 123.123.123.123...
Connected to 123.123.123.123.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.5
^]
telnet> quit
Connection closed.

# Test to port 30 (it's closed, nothing is listening on port 30)
$ telnet 123.123.123.123 30
Trying 123.123.123.123...
Connected to 123.123.123.123.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

Probably this is normal, because I'm natting all connections to redsocks, but I was wondering if there's a workaround.

I need to monitor the remote server status, for example sending SYN request to some specific ports, like 22 and 3389, but at the moment whatever port I test the port is opened.

Thanks in advance!

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

1 participant