-
Notifications
You must be signed in to change notification settings - Fork 0
/
Alpine Linux Command
63 lines (41 loc) · 1.08 KB
/
Alpine Linux Command
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ALPINE LINUX command
================
setup-alpine
setup-hostname alpine
rc-service hostname restart or /etc/init.d/hostname restart
setup-interfaces
setup-interfaces -a for dhcp
Static IP
/etc/network/interfaces and /etc/resolv.conf
/etc/network/interfaces file should look like so:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.147
netmask 255.255.255.0
gateway 192.168.0.1
setup-dns
/etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
rc-service networking start
If desired, you can also set it to load during boot, using rc-update add networking boot
SSH
setup-sshd utility
rc-service openssh start and rc-update add openssh
setup-ntp
rc-service name start and rc-update add name respectively.
setup-disk
setup-disk -m sys (auto)
apk add vim
apk update
apk update && apk upgrade
Firewall----
## Install both IPv4 and IPv6 version of IPtables ##
apk add ip6tables iptables
## Install awall ##
apk add -u awall
## Verify it ##
apk version awall
https://www.cyberciti.biz/faq/how-to-set-up-a-firewall-with-awall-on-alpine-linux/