-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
socat udp via tcp tunneling not working as expected #3792
Comments
Cannot repro here on 18317 and socat
How you figure. You've got an |
Not applicable to strace? Never use it before, but if I follow the command template it does return nothing. Yes. Do not know the internals (neither do want to know), but as I get it, it has something with nature of snmp. I tried with "nc" and "fifo", and when there is only one snmpget it went through, but for another one, it kills an existing process (sorry for vague description). local# mkfifo /tmp/fifo on another end of the tunnel, I used socat (so my success for one snmp get was fifo local, and socat remote) Ill today getup vm (debian stretch) so will verbose socat on that one for comparison. UPDATE: UPDATE2: |
Why did you close it? |
The line in your OP doesn't reproduce. The first |
Fair enough. I was merely hoping that it will give you hints about a potential issue based on you knowing internals. |
Tell you what it has only been a couple of days and agree it was a quick close. I'll leave it open for the customary couple of weeks and maybe there will be some community input. |
Please fill out the below information:
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.17763.253]
$ sudo socat -d -d -d -d -T15 -t5 udp4-recvfrom:161,reuseaddr,fork tcp:127.0.0.1:30033
2019/01/21 15:56:35 socat[5792] D getpid()
2019/01/21 15:56:35 socat[5792] D getpid() -> 5792
2019/01/21 15:56:35 socat[5792] D setenv("SOCAT_PID", "5792", 1)
2019/01/21 15:56:35 socat[5792] D setenv() -> 0
2019/01/21 15:56:35 socat[5792] D setenv("SOCAT_PPID", "5792", 1)
2019/01/21 15:56:35 socat[5792] D setenv() -> 0
2019/01/21 15:56:35 socat[5792] I socat by Gerhard Rieger - see www.dest-unreach.org
2019/01/21 15:56:35 socat[5792] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2019/01/21 15:56:35 socat[5792] I This product includes software written by Tim Hudson ([email protected])
2019/01/21 15:56:35 socat[5792] D socat version 1.7.3.1 on Feb 2 2016 21:25:06
2019/01/21 15:56:35 socat[5792] D setenv("SOCAT_VERSION", "1.7.3.1", 1)
2019/01/21 15:56:35 socat[5792] D setenv() -> 0
2019/01/21 15:56:35 socat[5792] D running on Linux version #253-Microsoft Mon Dec 31 17:49:00 PST 2018, release 4.4.0-17763-Microsoft, machine x86_64
2019/01/21 15:56:35 socat[5792] D argv[0]: "socat"
2019/01/21 15:56:35 socat[5792] D argv[1]: "-d"
2019/01/21 15:56:35 socat[5792] D argv[2]: "-d"
2019/01/21 15:56:35 socat[5792] D argv[3]: "-d"
2019/01/21 15:56:35 socat[5792] D argv[4]: "-d"
2019/01/21 15:56:35 socat[5792] D argv[5]: "-T15"
2019/01/21 15:56:35 socat[5792] D argv[6]: "-t5"
2019/01/21 15:56:35 socat[5792] D argv[7]: "udp4-recvfrom:161,reuseaddr,fork"
2019/01/21 15:56:35 socat[5792] D argv[8]: "tcp:127.0.0.1:30033"
2019/01/21 15:56:35 socat[5792] D sigaction(1, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(2, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(3, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(4, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(6, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(7, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(8, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(11, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(15, 0x7fffc91329f0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D signal(13, 0x1)
2019/01/21 15:56:35 socat[5792] D signal() -> 0x0
2019/01/21 15:56:35 socat[5792] D atexit(0x4066e0)
2019/01/21 15:56:35 socat[5792] D atexit() -> 0
2019/01/21 15:56:35 socat[5792] D calloc(1, 848)
2019/01/21 15:56:35 socat[5792] D calloc() -> 0xc50240
2019/01/21 15:56:35 socat[5792] D malloc(1024)
2019/01/21 15:56:35 socat[5792] D malloc() -> 0xc505c0
2019/01/21 15:56:35 socat[5792] I setting option "so-reuseaddr" to 1
2019/01/21 15:56:35 socat[5792] I setting option "fork" to 1
2019/01/21 15:56:35 socat[5792] D socket(2, 2, 17)
2019/01/21 15:56:35 socat[5792] I socket(2, 2, 17) -> 5
2019/01/21 15:56:35 socat[5792] D fcntl(5, 2, 1)
2019/01/21 15:56:35 socat[5792] D fcntl() -> 0
2019/01/21 15:56:35 socat[5792] D setsockopt(5, 1, 2, {0x1}, 4)
2019/01/21 15:56:35 socat[5792] D setsockopt() -> 0
2019/01/21 15:56:35 socat[5792] D bind(5, AF=2 0.0.0.0:161, 16)
2019/01/21 15:56:35 socat[5792] D bind() -> 0
2019/01/21 15:56:35 socat[5792] I starting recvfrom loop
2019/01/21 15:56:35 socat[5792] D sigaction(10, 0x7fffc9131df0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] D sigaction(17, 0x7fffc9131df0, 0x0)
2019/01/21 15:56:35 socat[5792] D sigaction() -> 0
2019/01/21 15:56:35 socat[5792] N receiving on AF=2 0.0.0.0:161
2019/01/21 15:56:35 socat[5792] D select(6, &0x20, &0x0, &0x0, NULL/0.000000)
2019/01/21 15:57:12 socat[5792] D select -> (, 0x20, 0x0, 0x0, NULL/0.000000), 1
2019/01/21 15:57:12 socat[5792] D recvmsg(5, 0x7fffc9131cd0{0x7fffc9131d10,112,0x7fffc9131c70,1,0x7fffc9132390,1024,0}, 34)
2019/01/21 15:57:12 socat[5792] D recvmsg(, {AF=2 0.0.0.0:0,112,,1,,1024,}, ) -> -1
2019/01/21 15:57:12 socat[5792] W recvmsg(): Invalid argument
2019/01/21 15:57:12 socat[5792] N exiting with status -1
2019/01/21 15:57:12 socat[5792] D exit(-1)
2019/01/21 15:57:12 socat[5792] D starting xioexit()
2019/01/21 15:57:12 socat[5792] D finished xioexit()
It should listen UDP snmp requests on 161 and tunnel it via ssh tcp to remote machine
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).Not applicable
Not applicable
The text was updated successfully, but these errors were encountered: