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

DPI Http01 solver for linux with nfqueue #1845

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

orangepizza
Copy link
Contributor

This pull request will add http.nfqueueport option, which when assigned a port will put a nfqueue rule on firewall to capture http request for token path, block it to reach web server and craft request packet for it. (Linux only)
Why anyone do that? because with this solver it don't need to care about any webserver on port 80.

Why this is draft PR? because this is just enough to run, and much to do yet (ex: currently can't handle ipv6 (not sure it skips or panics), no reasonable docstring, and some more bugs maybe)

using nfqueue for port-sniffing solver isn't my original idea:
https://community.letsencrypt.org/t/using-nfqueue-on-linux-as-a-novel-webserver-agnostic-http-authenticator/192625/23

http.nfqueueport is with port number option so run on pebble, but does it really need to set a port number or just blindly running on port 80 is enough?

@ldez
Copy link
Member

ldez commented Feb 22, 2023

Hello,

do you know that every commit creates a notification even with draft PR?

Can you try to reduce the number of commits? Thank you.

Otherwise, maybe you can clean a bit your current commits.

@orangepizza
Copy link
Contributor Author

this creates about 10 lingering empty packets sent by webserver to acme server, but as server

it was not that bright idea to edit on window and push it to linux vps with git push-pull. well squash everything until now

@ldez
Copy link
Member

ldez commented Feb 22, 2023

you have a problem with your rebase 😉

orangepizza and others added 2 commits February 22, 2023 20:38
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>

send RST to ACME server so it doens't retry

use not deprecated version of func
@orangepizza
Copy link
Contributor Author

rebase done I don't have ipv6 server, so I have no idea what will happen this got ipv6 packet.
iptable rule doesn't look like it will catch v6 packet but who knows?

@orangepizza
Copy link
Contributor Author

@ldez Kinda want to have testing for this, but as this is requires root to do anything (as this requires to set nfqueue)
and run entire test as root doesn't sound like a good idea

@orangepizza orangepizza marked this pull request as ready for review March 1, 2023 07:49
@orangepizza
Copy link
Contributor Author

nfqueue_linux_test.go needs root (sudo in it won't cut it) so can't run in CI

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

Successfully merging this pull request may close these issues.

None yet

3 participants