iptables rules: respect ipsec traffic
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
Docker using iptables ruins IPsec setup, because it masquerades packets that shouldn't be masqueraded. Please add -m policy --dir out --pol none to the POSTROUTING rule.
In detail: Docker creates a rule like the following.
-A POSTROUTING -s 172.16.62.0/24 ! -o docker0 -j MASQUERADE
Instead it should create
-I POSTROUTING -m policy --dir out --pol none -s 172.16.62.0/24 ! -o docker0 -j MASQUERADE
The code generating these is in libnetwork/drivers/bridge/setup_ip_tables.go. I can update the two iptables references, if you'd accept such a patch. I don't know and can't test the the other network provider unfortunately.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read libnetwork/drivers/bridge/setup_ip_tables.go and locate the two iptables references that generate the POSTROUTING rule. Compare their output with the examples in the issue; done means IPsec traffic is excluded from masquerading while the existing bridge rule behavior remains intact. No test file or runnable test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100