2

network-mirrored.service

 1 month ago
source link: https://gist.github.com/shigenobuokamoto/b565d468541fc8be7d7d76a0434496a0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

/etc/systemd/system/network-mirrored.service · GitHub

Instantly share code, notes, and snippets.

  • Star 15 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Clone this repository at <script src="https://gist.github.com/shigenobuokamoto/b565d468541fc8be7d7d76a0434496a0.js"></script>
Save shigenobuokamoto/b565d468541fc8be7d7d76a0434496a0 to your computer and use it in GitHub Desktop.
/etc/systemd/system/network-mirrored.service

Author

you can try it.

$ sudo systemctl --now enable network-mirrored

revision 8:
delete IPv6 routing filter
- natively supported in wsl 2.2.2

I saw your description in the issue "adding this action breaks the prerouting hook and disables any Docker rules set in the PREROUTING chain". Can you explain why? The dnat of 127.0.0.1 to 127.0.0.1 seems redundant. thx

@Adam-Jin
as you said, it is redundant.
nothing changes with this DNAT, except that it can terminate the prerouting hook.
PREROUTING is not processed by applying DNAT first.

this is the reason why PERROUTING (Docker's rules) is handled poorly in mirrored networking.
microsoft/WSL#10494 (comment)

explanation about systemd service can be found here.
microsoft/WSL#10494 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK