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

bridge network for blocking external network access. #930

Open
Nomiby opened this issue Nov 16, 2022 · 1 comment
Open

bridge network for blocking external network access. #930

Nomiby opened this issue Nov 16, 2022 · 1 comment

Comments

@Nomiby
Copy link

Nomiby commented Nov 16, 2022

Hello,

I am creating a test cni config for my pod tests on my host.

In docker, we can create an internal only network by specifying --internal while creating the bridge network.
https://docs.docker.com/engine/reference/commandline/network_create/#network-internal-mode

I am just wondering, if I want to achieve a similar network (blocking external network access for my pod), does it mean that I just need to omit the portmap plugin set up? Want to confirm if I am using things the right way.

Thanks!

@mccv1r0
Copy link
Member

mccv1r0 commented Nov 16, 2022

Omitting portmap sounds right.

It probably depends on what the main plugin is. If bridge you probably want to turn off things like:

"isDefaultGateway": false,
"ipMasq": false,
"hairpinMode": false,  // maybe?

if you want to block external network access initiated from inside as well

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