Refs
Http://askubuntu.com/questions/293356/how-to-open-a-particular-port-in-ubuntu
Run this on the commandline; It should solve Issue:sudo iptables-a input-m conntrack--ctstate new,related,established-j ACCEPT
To do a specific port:
sudo iptables-a input-p <tcp or udp> <--dport or--sport> <port>-j ACCEPT
The INPUT is the chain for incoming traffic. The-P is protocol (either TCP or UDP--dport or--sportspecify allowing for destination or source port.-j is ' jump ' and its where you ACCEPT, REJECT, ordrop the packet (s)
So, the open 5600 port receives the broadcast, the result:
sudo iptables-a input-p udp-d 0/0-S 0/0--dport 5600-j ACCEPT
Open 8000 ports receive TCP, as a result:
sudo iptables-a input-p tcp-d 0/0-S 0/0--dport 8000-j ACCEPT
Set the rules of the firewall to allow 5600 ports to enter
sudo ufw allow 5600
sudo ufw allow 8000
View Status:
sudo netstat-ntlup
NC Usage:
Refs
Http://manpages.ubuntu.com/manpages/hardy/man1/nc_openbsd.1.html
client/server MODEL
NC.
NC listening on a specific port for a connection.
For example:
$ nc-l 1234
NC are now listening on port 1234 for a connection. On a second console
(or a second machine), connect to the machine and port being on:
$ NC listened 1234