

I´ve been trying to forward packets coming from port 4001 to a new multicast address with different port and finally I found the solution that perhaps someone can find useful: (My local IP is 214.25.250.200) socat udp4-recvfrom:4001,ip-add-membership=225.25.250.1:214.25.250.200,fork udp-datagram:225.25.250.1:5001 🥺 Was this helpful? Please add a comment to show your appreciation or feedback ↓ Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. Further logging is directed to syslog with facility local2: With -lmlocal2, socat logs to stderr until successfully reaching the accept loop. It provides a little security by su’ing to user nobody after forking it only permits connections from the private 10 network (range) due to reuseaddr, it allows immediate restart after master process’s termination, even if some child sockets are not completely shut down. This example handles an almost arbitrary number of parallel or consecutive connections by fork’ing a new process after each accept(). # echo "show info" | socat unix-connect:/var/tmp/haproxy stdio TCP port forwarder, each side bound to another local IP address (bind) The following will give you information about the running HAProxy process such as pid, uptime and much more:

$ (sleep 5 echo YOURSSHPASSWORDHERE sleep 5 echo date sleep 1) |socat - EXEC:'ssh -l userName ',pty,setsid,ctty Get Information About Haproxy
#Socat usage password
You can connect to the remote ssh server called server1 and use pty for communication between socat and ssh, makes it ssh’s controlling tty (ctty), and makes this pty the owner of a new process group (setsid), so ssh accepts the password from socat. You can terminate connection by pressing i.e. To redirect all port 80 conenctions to ip 202.54.1.5, enter: Visit the official website and grab the latest version:
#Socat usage install
$ sudo apt-get update & sudo apt-get install socat Source Code Installation Install socat Under Debian / Ubuntu Linux You must have a good understanding of TCP/IP and UNIX networking to use this tool. WARNING! These examples may open your computer ports and sockets to other Internet users.
