LXC via command line steuern

Alex_Ha

Member
Feb 22, 2020
2
0
6
53
Liebe Community,

ich versuche meine LXC über shell skripte zu steuern.

Mein erster skript schaltet in sechs LXC "autostart on boot" ein

-----------------------------------------------
#!/bin/bash -v
for i in {100..106}
do
pct set $i --onboot yes
echo "Autostart node Nr: $i von 106 auf yes gesetzt"
done
----------------------------------------------

Nun möchte ich jeweils für die LXC die firewall ein bzw ausschalten.
Wie lautet hierfür die Schreibweise ?

folgendes habe ich ohne Erfolg ausprobiert

pct config 100 net0:firewall=1

pct set 100 net0:firewall=1

pct set 100 firewall=1

( Vorerst als Test nur für node 100 )

Beste Grüße
Alex
 
Last edited:
Liebe Community,

ich versuche meine LXC über shell skripte zu steuern.

Mein erster skript schaltet in sechs LXC "autostart on boot" ein

-----------------------------------------------
#!/bin/bash -v
for i in {100..106}
do
pct set $i --onboot yes
echo "Autostart node Nr: $i von 106 auf yes gesetzt"
done
----------------------------------------------

Nun möchte ich jeweils für die LXC die firewall ein bzw ausschalten.
Wie lautet hierfür die Schreibweise ?

folgendes habe ich ohne Erfolg ausprobiert

pct config 100 net0:firewall=1

pct set 100 net0:firewall=1

pct set 100 firewall=1

( Vorerst als Test nur für node 100 )

Beste Grüße
Alex


pct set 100 -net0 name=eth0,bridge=vmbr0,firewall=1......
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!