-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLXC-setup-notes
33 lines (26 loc) · 1.55 KB
/
LXC-setup-notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# setup the LXC as a SCIONLab node
lxc init ubuntu:22.04 scionlab
lxc start scionlab
lxc config device add scionlab scion-50001-udp proxy listen=udp:0.0.0.0:50001 connect=udp:127.0.0.1:50001
lxc config device add scionlab scion-50002-udp proxy listen=udp:0.0.0.0:50002 connect=udp:127.0.0.1:50002
lxc config device add scionlab scion-50003-udp proxy listen=udp:0.0.0.0:50003 connect=udp:127.0.0.1:50003
lxc config device add scionlab scion-50004-udp proxy listen=udp:0.0.0.0:50004 connect=udp:127.0.0.1:50004
lxc config device add scionlab scion-50005-udp proxy listen=udp:0.0.0.0:50005 connect=udp:127.0.0.1:50005
lxc config device add scionlab scion-50006-udp proxy listen=udp:0.0.0.0:50006 connect=udp:127.0.0.1:50006
lxc config device add scionlab ssh-2222-tcp proxy listen=tcp:0.0.0.0:2222 connect=tcp:127.0.0.1:2222
lxc exec scionlab -- sudo apt-get install apt-transport-https ca-certificates
lxc exec scionlab -- /bin/bash -c "cat <<-EOF > /etc/apt/sources.list.d/scionlab.list
deb [trusted=yes] https://packages.netsec.inf.ethz.ch/debian all main
EOF"
lxc exec scionlab -- sudo apt-get -y update
lxc exec scionlab -- sudo apt-get -y install scionlab
lxc exec scionlab -- sudo apt install scion-apps-sensorapp
lxc exec scionlab -- /bin/bash -c "cat <<-EOF > /etc/ssh/sshd_config.d/70-scionlab.conf
Port 2222
Match User scionlab
PasswordAuthentication yes
EOF"
lxc exec scionlab -- sudo systemctl restart ssh.service
lxc exec scionlab -- adduser --disabled-password --gecos "SCIONLab Workshop User" scionlab
# passwd scionlab
# scionlab-config the desired AS configuration