Skip to content
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

iptable No chain or Chain already exist #19

Open
MasKogNavier opened this issue Nov 18, 2021 · 1 comment
Open

iptable No chain or Chain already exist #19

MasKogNavier opened this issue Nov 18, 2021 · 1 comment

Comments

@MasKogNavier
Copy link

MasKogNavier commented Nov 18, 2021

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.

@nbdd0121
Copy link
Owner

I think this is working as intended. It will try to create a new chain regardless if it already exists or not (so will warn for the 2nd time) and will delete the rule regardless if it exists or not (so will warn for the 1st time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants