I am trying to create a TCP socket server on port 3498, the server starts up properly and begins listening to incomming coections, however it only accepts coections from local clients. I tried the following tests:
I checked to see if the port 3498 is already open:
netstat -a | grep 3498
It retued nothing.
Started nc server:
nc -l 3498
Tried to coect from the same machine and coection was established:
telnet localhost 3498
Trying 127.0.0.1...
coected to localhsot
Then i tried coecting using my wlan ip and it was refused:
telnet "my wlan ip" 3498
Trying <my.wlan.ip>...
telnet: Unable to coect to remote host: coection refused
I tried many other ports and all worked locally but not remotely.
I have ufw installed and disabled, I tried reseting it but no effect:
sudo ufw reset
I then reset the iptables:
sudo iptables -F
sudo iptables -X
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Nothing changed.
I also disabled my Squid3 proxy server and rebooted the machine and it didn't change anything. And Strange enough though I tried the port 3499 and it worked fine locally and remotely.
Why is this happening, what is the problem and how can i fix it?
Edit:
I have port forwarding on my router to the machine that i'm testing on. So coection to my public IP are forwarded to my server.
برچسب:
نویسنده: استخدام کار