# FreedomBox on LXC

**URL:** https://discuss.freedombox.org/t/freedombox-on-lxc/1493
**Category:** Development
**Created:** [March 20, 2021, 7:34pm UTC](https://discuss.freedombox.org/t/freedombox-on-lxc/1493 "2021-03-20T19:34:39Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Ramon](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/r/34f0e0/32.png) [@Ramon](https://discuss.freedombox.org/u/Ramon)
#### Post date: [May 8, 2021, 8:28am UTC](https://discuss.freedombox.org/t/freedombox-on-lxc/1493/7 "2021-05-08T08:28:15Z")

</div>

Hi, for information,  
I use put a Freedombox inside LXC container and made it only accessible from a OpenVPN server inside the container too.  
Here, you will find more explanation on how to setup Freedom Box in a container :

> [@Freedombox in LXC -- how to make OpenVPN work?](https://discuss.freedombox.org/t/freedombox-in-lxc-how-to-make-openvpn-work/1437):
>
> \*\* Problem : run automatically OpenVPN at startup of a Freedombox running in a LXC container \*\* Currently I’m struggling to run openVPN. After some efforts I attempt to run OpenVPN manually using the following (see misc section bellow for further info on Freedom box installation and network setup of the LXC container), sudo openvpn /etc/openvpn/server/freedombox.conf with sudo ifconfig -a I see the tun0 interface. but It seems to have some problem while running it properly and automatical…

I used the LXC MACVLAN option so that my container is directly accessible on the local network and its IP adress is provided by the Box of my ISP.

Coming to firewall issues opened by NickA [FreedomBox on LXC - #5 by NickA](https://discuss.freedombox.org/t/freedombox-on-lxc/1493/5)

I understood that there is a lack of compatibility between the Firewalld use by the Freedom Box and LXC. So I removed it and choose to build the firewall function using IPTables.

```
#Remove firewalld

```

sudo service firewalld stop  
sudo apt-get purge firewalld  
# install Iptables persistent  
apt-get install iptables-persistent

After that I used one script to set IPtables rules :  
cd ~  
mkdir config-iptables  
cd config-iptables  
nano iptable-config.sh # the script is given on next post  
chown 700 iptable-config.sh

---

_[View the full topic](https://discuss.freedombox.org/t/freedombox-on-lxc/1493)._
