Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 1228

? | [? HELP WANTED ?] | LINUX SHELL SCRIPTING ? SSH TUNNELING ? | ?

by Infinimonster - 05 June, 2023 - 07:10 PM
This post is by a banned member (Infinimonster) - Unhide
809
Posts
342
Threads
2 Years of service
#1
Anyone can help me there? (i included all informations needed within the link)?  https://paste.fo/4ecad4fa9666
[Image: V5qDXAC.png]
-----------------------------------------
Royality!

Waiting For Like
  Telegram: @Infinimonster
Discord:  Infinimonster#0002
-----------------------------------------
[Image: V5qDXAC.png]
 
This post is by a banned member (NothingToSeeHereYK) - Unhide
118
Posts
16
Threads
4 Years of service
#2
From my knowledge, it can be one of three things:
1. Port 2000 is in use or blocked on the destination VPS.
2. Incorrect IP addresses or ports used in the script.
3. Firewall rules blocking the connection.

For the first theory, Use `netstat -tuln` to check if the port is in use. If so, stop the process or choose a different port.

For the second theory, Verify the IP addresses and port numbers in the script.

For the third theory, Check and update firewall rules using `iptables` or similar commands depending on the firewall system.

Check logs or error messages during script execution for more details.
Test connectivity between the source and destination VPS on specified ports using `nc` (netcat) or similar tools.
.
This post is by a banned member (Infinimonster) - Unhide
809
Posts
342
Threads
2 Years of service
#3
(06 June, 2023 - 02:05 PM)NothingToSeeHereYK Wrote: Show More
From my knowledge, it can be one of three things:
1. Port 2000 is in use or blocked on the destination VPS.
2. Incorrect IP addresses or ports used in the script.
3. Firewall rules blocking the connection.

For the first theory, Use `netstat -tuln` to check if the port is in use. If so, stop the process or choose a different port.

For the second theory, Verify the IP addresses and port numbers in the script.

For the third theory, Check and update firewall rules using `iptables` or similar commands depending on the firewall system.

Check logs or error messages during script execution for more details.
Test connectivity between the source and destination VPS on specified ports using `nc` (netcat) or similar tools.

1. Port is open in ufw firewall rules and configured in the ssh_config file
2. Ip Address and port for the destination are correct (i changed it in the paste as i dont want to share the real ip)
3. As mentioned in step 1, firewall has the port open and it happen on different systems (home pc, work pc, external linux server)


I used nc command already and it shows me that the port is open (when i remove it from ssh config so it dont run the ssh process on that port but then, it give connection refused error.

When i use online port scanners, specifally this one, it shows that only port 22 is open even tho i opened others (and as mentioned above, nc command show that the port is open too.


nc -z -v -w 1 "$DEST_IP" "$DEST_PORT"

Warning: forward host lookup failed for vm233219.example.cloud: Unknown host
vm233219.example.cloud [32.321.321.321] 2223 (?) open

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "32.321.321.321" "2222"
Warning: forward host lookup failed for vm233219.example.cloud: Unknown host
vm233219.example.cloud [32.321.321.321] 2222 (?) : Connection timed out

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "localhost" "2222"
localhost [127.0.0.1] 2222 (?) open

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "localhost" "2223"
localhost [127.0.0.1] 2223 (?) open

Note that i opend port 2222 on localhost (12.123.123.123) and opend port 2223 on the destination host (32.321.321.321)
I then try to connect to ssh like so: ssh 12.123.123.123 -p 2222 which then should redirect it to the destination host on port 2223 which however causes the timeout error.
[Image: V5qDXAC.png]
-----------------------------------------
Royality!

Waiting For Like
  Telegram: @Infinimonster
Discord:  Infinimonster#0002
-----------------------------------------
[Image: V5qDXAC.png]
 
This post is by a banned member (NothingToSeeHereYK) - Unhide
118
Posts
16
Threads
4 Years of service
#4
(06 June, 2023 - 05:26 PM)Infinimonster Wrote: Show More
(06 June, 2023 - 02:05 PM)NothingToSeeHereYK Wrote: Show More
From my knowledge, it can be one of three things:
1. Port 2000 is in use or blocked on the destination VPS.
2. Incorrect IP addresses or ports used in the script.
3. Firewall rules blocking the connection.

For the first theory, Use `netstat -tuln` to check if the port is in use. If so, stop the process or choose a different port.

For the second theory, Verify the IP addresses and port numbers in the script.

For the third theory, Check and update firewall rules using `iptables` or similar commands depending on the firewall system.

Check logs or error messages during script execution for more details.
Test connectivity between the source and destination VPS on specified ports using `nc` (netcat) or similar tools.

1. Port is open in ufw firewall rules and configured in the ssh_config file
2. Ip Address and port for the destination are correct (i changed it in the paste as i dont want to share the real ip)
3. As mentioned in step 1, firewall has the port open and it happen on different systems (home pc, work pc, external linux server)


I used nc command already and it shows me that the port is open (when i remove it from ssh config so it dont run the ssh process on that port but then, it give connection refused error.

When i use online port scanners, specifally this one, it shows that only port 22 is open even tho i opened others (and as mentioned above, nc command show that the port is open too.


nc -z -v -w 1 "$DEST_IP" "$DEST_PORT"

Warning: forward host lookup failed for vm233219.example.cloud: Unknown host
vm233219.example.cloud [32.321.321.321] 2223 (?) open

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "32.321.321.321" "2222"
Warning: forward host lookup failed for vm233219.example.cloud: Unknown host
vm233219.example.cloud [32.321.321.321] 2222 (?) : Connection timed out

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "localhost" "2222"
localhost [127.0.0.1] 2222 (?) open

root@sourcevps-974513-1:~/scripts# nc -z -v -w 1 "localhost" "2223"
localhost [127.0.0.1] 2223 (?) open

Note that i opend port 2222 on localhost (12.123.123.123) and opend port 2223 on the destination host (32.321.321.321)
I then try to connect to ssh like so: ssh 12.123.123.123 -p 2222 which then should redirect it to the destination host on port 2223 which however causes the timeout error.

I sent you a dm on telegram, since it isn't letting me post some terms on cracked.io as they've blacklisted them.
.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 3 Guest(s)