nbdd0121 / nbdd0121/wsld

iptable No chain or Chain already exist

Open
#19 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
305
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I tied below,

First
( at Windows10 Pro 64bit powershell by admin )
$ wsldhost.exe --daemon

Second
( at WSL2 Ubuntu 18.04 LTS)
$ sudo ~/.cargo/bin/wsld

and got Error,

>Received time 2021-11-18T07:23:32.243436Z, clock off by 2ms 303us, adjust
iptables: No chain/target/match by that name.

After that, once Istopped the process with Ctrl + C and ran it again, I got the following.

>Received time 2021-11-18T07:41:20.395486Z, clock off by -1ms 964us, adjust
iptables: Chain already exists.

I think that isn't working well, right?

now my ~/.wsld.toml is below

# Leave out this section to disable X11 forwarding
[x11]
# X11 display number to listen *inside* WSL. The X server in Windows can specified as argument when running wsldhost.exe.
# Default to 0, can be omitted.
display = 0

# Leave out this section to disable time synchronisation
# If you need time synchronisation, you should either run wsld with root, or give it `cap_sys_time` capability using `sudo setcap cap_sys_time+eip <PATH to wsld>`.
[time]
# Interval between syncs
# Default to 10min, can be omitted
interval = "1hr"

# Leave out this section to disable TCP port forwarding
# This feature is experimental, feedbacks and suggestions welcome.
# This feature will WSL localhost to Windows localhost, so you can connect
# servers running in Windows in WSL. This feature requires interaction with
# iptables, so you need to either run wsld as root or allow wsld to use sudo.
[tcp_forward]
# iptables command to use. nftables seem not to work so you need to have
# the legacy one. If you are not using Debian it is likely you need to change it.

iptables_cmd = "sudo iptables"

# Ports to forward
ports = [ 6666 ]

# Leave out this section to disable SSH agent forwarding
[ssh_agent]
# Default to the path below, can be omitted if unchanged
# Set `SSH_AUTH_SOCK` to the path you specified.
#ssh_auth_sock = "/tmp/.wsld/ssh_auth_sock"

I can't fix this, so please help.

thank you.

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 two wsld startup commands from the report on Windows 10 with WSL2 Ubuntu, using the supplied ~/.wsld.toml and its [tcp_forward] configuration. The payload names no source file or test; trace the iptables setup involved in TCP forwarding and determine why the first run reports a missing chain and the next reports an existing chain. Done means repeated starts handle the iptables state without either error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust, ubuntu
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.