Add swap on host
This commit is contained in:
parent
eead51f7b5
commit
e8e448d4f4
@ -112,6 +112,12 @@ write_files:
|
||||
path: /etc/syslog-ng/syslog-ng.conf
|
||||
|
||||
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\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 8443 -j ACCEPT\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 2375 -j ACCEPT\n-A INPUT -p tcp -m state --state NEW -m tcp --match multiport --dports 23000:23030 -j ACCEPT' /etc/iptables/rules.v4
|
||||
- iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --match multiport --dports 23000:23030 -j ACCEPT
|
||||
|
Loading…
Reference in New Issue
Block a user