# LXC container for lightweight remote access

<span style="white-space: pre-wrap;">I am running a lxc container for my access to the makerspace. here are the steps I took to stand up the lxc container. You can use this as a guide for standing up your own personal LXC container. you dont have to do tailscale on there but this has some info on securing the container. </span>

1\. login as root/PAM auth on the proxmox cluster

2\. get to the shell on a particular system

3\. run a proxmox convience script to standup a very basic ubuntu lxc container

4\. once the container is stood up and running get into the root console and do the following

<span style="white-space: pre-wrap;"> </span>1. change password for root `passwd` to something secure and your own

<span style="white-space: pre-wrap;"> </span><span style="white-space: pre-wrap;">2. modify system to prevent auto-login using the command below and remove the `--auto-login root` portion of the line that is there. </span>

```
nano /etc/systemd/system/container-getty@1.service.d/override.conf
```

<span style="white-space: pre-wrap;"> </span>3. reboot the container

<span style="white-space: pre-wrap;"> </span>4. login to your root user

<span style="white-space: pre-wrap;"> </span>5. run `wget https://github.com/YOUR-GITHUB-USERNAME.keys` to pull down your ssh keys

<span style="white-space: pre-wrap;"> </span>6. modify your /etc/ssh/sshd\_config file to allow for root login via ssh

<span style="white-space: pre-wrap;"> </span>7. verify you can ssh to the system

<span style="white-space: pre-wrap;"> </span>8. modify system hostname using proxmox gui under container &gt; DNS &gt; hostname

<span style="white-space: pre-wrap;"> </span>9. reboot to apply hostname

<span style="white-space: pre-wrap;"> </span>10. once all that works install tailscale the normal way you do that on linux servers.

<span style="white-space: pre-wrap;"> </span>11. setup subnet routing

<span style="white-space: pre-wrap;"> </span>12. \*\*TURN OFF SUBNET ROUTING ONCE IT WORKS\*\* we should be using the wireguard VPN for access. this is a backup in the case the wireguard is acting up

<span style="white-space: pre-wrap;">5. once the system is configured, your backdoor now should work just fine. I recomend not going crazy with this system. </span>