Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Last active December 1, 2024 05:30
Show Gist options
  • Save e-minguez/0e74044a32a6870ebebf044a1ad487e2 to your computer and use it in GitHub Desktop.
Save e-minguez/0e74044a32a6870ebebf044a1ad487e2 to your computer and use it in GitHub Desktop.

Revisions

  1. Eduardo Mínguez revised this gist Mar 24, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -52,5 +52,6 @@ update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
    Finally, install docker:

    ```bash
    apt install docker.io
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    ```
  2. Eduardo Mínguez revised this gist Mar 24, 2021. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -47,8 +47,6 @@ Install prerrequisites:
    apt install iptables kmod
    update-alternatives --set iptables /usr/sbin/iptables-legacy
    update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
    update-alternatives --set arptables /usr/sbin/arptables-legacy
    update-alternatives --set ebtables /usr/sbin/ebtables-legacy
    ```

    Finally, install docker:
  3. Eduardo Mínguez revised this gist Mar 24, 2021. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -41,12 +41,18 @@ lxc-start -n <container_name>
    lxc-attach -n <container_name>
    ```

    Install docker and stuff:
    Install prerrequisites:

    ```bash
    apt install iptables kmod
    update-alternatives --set iptables /usr/sbin/iptables-legacy
    update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
    update-alternatives --set arptables /usr/sbin/arptables-legacy
    update-alternatives --set ebtables /usr/sbin/ebtables-legacy
    apt install docker.io kmod
    ```

    Finally, install docker:

    ```bash
    apt install docker.io
    ```
  4. Eduardo Mínguez created this gist Mar 24, 2021.
    52 changes: 52 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    ## Turris

    ```bash
    opkg install kmod-veth
    opkg install kmod-ipt-extra
    opkg install iptables-mod-extra
    ```

    * Install a new container (I created an arch linux container)
    * Open up the /srv/lxc/containername/config file for editing:

    ```ini
    # Be aware this has security implications
    lxc.include = /usr/share/lxc/config/nesting.conf

    # Configure network to bridge to lan
    lxc.net.0.type = veth
    lxc.net.0.link = br-lan
    lxc.net.0.flags = up
    lxc.net.0.name = eth0
    lxc.net.0.hwaddr = 22:11:85:de:f9:fb
    # Add the following lines to open up access to the host, allowing docker to successfully start
    raw.lxc: |-
    lxc.mount.auto = cgroup:rw:force
    lxc.cgroup.devices.allow = a
    security.nesting: "true"
    security.privileged: "true"
    lxc.cap.drop =
    ```

    * Save and exit the config file
    * Start the lxc container

    ```bash
    lxc-start -n <container_name>
    ```

    * Attach to the console of the lxc container

    ```bash
    lxc-attach -n <container_name>
    ```

    Install docker and stuff:

    ```bash
    update-alternatives --set iptables /usr/sbin/iptables-legacy
    update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
    update-alternatives --set arptables /usr/sbin/arptables-legacy
    update-alternatives --set ebtables /usr/sbin/ebtables-legacy
    apt install docker.io kmod
    ```