Difference between revisions of "Socat"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 17: Line 17:
  
 
== Related terms ==
 
== Related terms ==
* [[logger]]
+
* [[logger]] pr [[systemd-cat]]
 
 
  
 
== See also ==
 
== See also ==

Revision as of 11:03, 14 May 2020

wikipedia:socat (2009)http://www.dest-unreach.org/socat/

Forward port 80 to localhost:8090 [1]

  • socat TCP-LISTEN:80,fork TCP:127.0.0.1:8090
  • socat TCP-LISTEN:80,fork,reuseaddr TCP:127.0.0.1:8090

Debugging:

  • socat -d -d TCP-LISTEN:80,fork TCP:127.0.0.1:8090

Logs connections (-d -d):

2019/05/13 04:24:30 socat[15433] N listening on AF=2 0.0.0.0:XX
2019/05/13 04:24:43 socat[15433] N accepting connection from AF=2 xx.99.12.xxx:62833 on AF=2 xxx.xxx.xxx.xxx:2244
2019/05/13 04:24:43 socat[15433] N forked off child process 15438
2019/05/13 04:24:43 socat[15433] N listening on AF=2 0.0.0.0:XX
2019/05/13 04:24:43 socat[15438] N opening connection to AF=2 1xx.253.51.xx:XX
2019/05/13 04:24:44 socat[15438] N successfully connected from local address AF=2 xxx.xxx.xxx.xxx:46596
2019/05/13 04:24:44 socat[15438] N starting data transfer loop with FDs [6,6] and [5,5]

Related terms

See also

  • https://unix.stackexchange.com/a/293308
  • Advertising: