Add swap on host
This commit is contained in:
parent
93404eab2d
commit
d582f7ae62
@ -317,6 +317,12 @@ write_files:
|
||||
permissions: 0o755
|
||||
|
||||
runcmd:
|
||||
- dd if=/dev/zero of=/swap count=2M status=progress
|
||||
- chmod 0600 /swap
|
||||
- mkswap /swap
|
||||
- echo "/swap none swap sw 0 0" >> /etc/fstab
|
||||
- swapon -a
|
||||
|
||||
# Allow traffic in IPv4
|
||||
- sed -i '/-A INPUT -j REJECT/i-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT' /etc/iptables/rules.v4
|
||||
- iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
|
||||
|
Loading…
Reference in New Issue
Block a user