Tips for opening a socket on the server

1. To open a port on the server side


Server IP :  ; Client IP :


[root@desktop23 log]# nc -l 1111

2. From client side you can connect to server and can send any type of data

[root@desktop23 log]# nc 1111


[root@desktop23 log]# telnet  1111



It will show output to Server side and server also can revert back

============= Now the most important and useful feature ever ==========


You can open any programe like (firefox , gedit etc ) of server side


Steps for doing this


1. AT server side fire the below commands


1. [root@desktop23 Desktop]#  mkfifo /tmp/123

2. [root@desktop23 Desktop]# cat /tmp/123 |  /bin/bash -e 2>/tmp/123 | nc -l 2222 >/tmp/123


From client side:


[root@desktop23 Desktop]# nc  2222


Note: It will open Firefox at server side