Tips for opening a socket on the server

1. To open a port on the server side

—-

Server IP : 192.168.0.23  ; Client IP :  192.168.0.117

—-

[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 192.168.0.23 1111

OR

[root@desktop23 log]# telnet 192.168.0.23  1111

hii

—–

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 192.168.0.23  2222

Firefox

Note: It will open Firefox at server side