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

[QUESTION] Can I implement NAT with bpftime in no-privileged container #316

Open
Charlie17Li opened this issue Jul 31, 2024 · 3 comments
Open

Comments

@Charlie17Li
Copy link

Charlie17Li commented Jul 31, 2024

For tradictional ebpf, I can implement NAT with xdp/tc. but these ways always require "root".

I want to know if I can implement NAT with bpftime in no-privileged container.

thanks for developing this exciting project.

@Officeyutong
Copy link
Contributor

For tradictional ebpf, I can implement NAT with xdp/tc. but these ways always require "root".

I want to know if I can implement NAT with bpftime in no-privileged container.

thanks for developing this exciting project.

We didn't support network related features yet, currently we only support uprobe and syscall trace

But maybe using uprobes to hook syscall functions like socket, write, read, would work, but we haven't tested it yet

@yunwei37
Copy link
Member

yunwei37 commented Aug 6, 2024

We have examples using dpdk or possible using afxdp to run the network functions in xdp.

So part of the answer is yes, bpftime can help deploy these NAT to userspace.

But the dpdk and afxdp still needs root access.

@yunwei37
Copy link
Member

yunwei37 commented Aug 9, 2024

You can find some code here and we will release more later: https://github.com/eunomia-bpf/XDP-eBPF-in-DPDK

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

3 participants