I'm clearly not very good at this stuff.
But I have tried the following:
sudo iptables -A INPUT -p tcp --dport 21025 -j ACCEPTBut it seems to make no difference.
netstat -an | grep LISTEN tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:50564 0.0.0.0:* LISTEN
tcp6 0 0 :::110 :::* LISTEN
tcp6 0 0 :::143 :::* LISTEN
tcp6 0 0 :::111 :::* LISTEN
tcp6 0 0 :::21 :::* LISTEN
tcp6 0 0 :::53 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::39670 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN
tcp6 0 0 :::25 :::* LISTENI'd just like to open this port so I can play games on port 21025 :)
Running Ubuntu 12.04 on a dedicated server and running the commands through the terminal.
1 Answer
A port is just a number. Together with a IP address it forms a TCP address.
A port is called "open" if some program listening on that TCP address for incoming connections. It's called "closed" if there isn't any such program or the kernel is filtering away network packages for this address.
By default Ubuntu doesn't filter any network packages. So to open a port all you have to do is to start a program that listens on that port.
3