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

How to enable firewall for container network device? #294

Closed
Tumetsu opened this issue Apr 8, 2023 · 3 comments · Fixed by #295
Closed

How to enable firewall for container network device? #294

Tumetsu opened this issue Apr 8, 2023 · 3 comments · Fixed by #295
Labels
✨ enhancement New feature or request

Comments

@Tumetsu
Copy link
Contributor

Tumetsu commented Apr 8, 2023

Is your feature request related to a problem? Please describe.
I want to automatically set security group and assign said security group to my lxc container. I can do that by using security group resource and firewall options resource. However, to me it looks like Proxmox requires you to check one more checkbox to actually enable the firewall. That checkbox is located in Network page of a container:
image

Is there support for toggling that to true? For me it seems to default false. I checked container resource's docs but its network part did not have any mention of firewall. Am I missing something here?

Describe the solution you'd like
Add boolean flag for network device firewall.

@Tumetsu Tumetsu added the ✨ enhancement New feature or request label Apr 8, 2023
@bpg
Copy link
Owner

bpg commented Apr 9, 2023

Hey @Tumetsu 👋🏼
Indeed, there should be a firewall argument for network adapters, both for LXC and VM. Will add it in the next release.

Thanks for reporting!

@bpg
Copy link
Owner

bpg commented Apr 10, 2023

LXC example:

resource "proxmox_virtual_environment_container" "example" {
  ...

  network_interface {
    name     = "veth0"
    mtu      = 1450
    firewall = true
  }
}

@Tumetsu
Copy link
Contributor Author

Tumetsu commented Apr 10, 2023

Thanks for quick fix! Got my firewall settings IaC'd now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants