EternalTerminal
EternalTerminal copied to clipboard
Error binding port when port forwarding even though existing port is outgoing
Saw the following problem when trying to connect with port forwarding (-t 12340-12350:12340-12350):
> et -p 10000 <redacted> -t 12340-12350:12340-12350
Enter passphrase for key '<redacted>':
Error binding 2/1/6: 98 Address already in use
Error establishing port forward: Error binding port 12344: 98 Address already in use
sudo netstat -lnpt | grep 12344 produces nothing, means nothing is listening on that port
Only using lsof revealed the culprit:
sudo lsof -i tcp:12344
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
slack ... ... ... IPv4 1013640 0t0 TCP <redacted>:12344->ec2-52-215-161-110.eu-west-1.compute.amazonaws.com:https (ESTABLISHED)
Restarting slack allowed me to connect via et.
Looks like et port forwarding conflicts with any forwarded port being used instead of only with ports that are being open for listening.
Please let me know if this is not by design.
I will look into this problem when I have time, if no one else fixes it before me.
Thanks!