jpillora / jpillora/chisel

UDP forwards : client: tun: conn#1: exceeded max udp connections (100)

Open
#363 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
16.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Running into a weird bug with chisel v1.77 on linux.

setup
Server address: 192.168.0.x
Sever: sudo chisel server -p 8888 --reverse

client address 10.1.1.200
-bash-4.2$ ./chisel client -v 192.168.0.x:8888 R:2000:10.1.1.250:2000/tcp R:2000:10.1.1.250:2000/udp

from 192.168.0.x with chisel running I start a python script 'python connect_and_stream.py 127.0.0.1' to send data to TCP and UDP port 2000. for the UDP part.. the python connect looks like target = socket(AF_INET, SOCK_DGRAM)

chisel starts showing traffic... its working.....

2022/06/04 00:31:57 client: Connecting to ws://192.168.0.x:8888
2022/06/04 00:31:57 client: Handshaking...
2022/06/04 00:31:58 client: Sending config
2022/06/04 00:31:58 client: Connected (Latency 89.543041ms)
2022/06/04 00:31:58 client: tun: SSH connected
2022/06/04 00:31:58 client: tun: conn#1: Open [1/1]
2022/06/04 00:32:10 client: tun: conn#1: exceeded max udp connections (100)
2022/06/04 00:32:10 client: tun: conn#1: exceeded max udp connections (100)
2022/06/04 00:32:10 client: tun: conn#1: exceeded max udp connections (100)
...
I start seeing LOTS of max udp connections exceeded...
...

2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:38844->10.1.1.250:2000: use of closed network connection
2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:49839->10.1.1.250:2000: use of closed network connection
2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:57298->10.1.1.250:2000: use of closed network connection
2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:43705->10.1.1.250:2000: use of closed network connection
2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:56117->10.1.1.250:2000: use of closed network connection
2022/06/04 00:10:43 client: tun: conn#1: read error: read udp 10.1.1.200:32925->10.1.1.250:2000: use of closed network connection
...
which leads to
2022/06/04 00:10:43 client: tun: conn#1: Close [0/1] (error dial udp 10.1.1.250:2000: socket: too many open files)

is there a way to increase MAX udp connections? or... some switch to make this work?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the UDP forwarding setup using the supplied chisel client command and connect_and_stream.py script. Inspect the client UDP forwarding path and handling of the reported 100-connection limit; the issue names no source file or test. Done means the connection and file-descriptor exhaustion behavior is explained and the expected resolution is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.