Category Archives: linux

systemd 111

netstat -natp| grep :111
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd

To 111 port listening disable you can like this:
systemctl stop rpcbind.socket

systemctl disable rpcbind.socket
Removed symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket

Error: unsupported deleted submount: (deleted)/dev/log

Setting up checkpoint…
set CPU flags..
suspend…
Can not suspend container: Invalid argument
Error: unsupported deleted submount: (deleted)/dev/log
Checkpointing failed
Error in run_cmd (pcopy.c:334): Command date ‘+%s.%N’ > /tmp/tmp.sJn0B2zf0e; vzctl –skiplock chkpnt 31581 –suspend –flags 161183 1>&2 failed with code 16
Error: ploop copy -s /dev/ploop45973 failed
Error: Failed to copy top ploop delta
Killed by signal 15.

To find issue:
grep /dev/log /proc/*/mountinfo 2>/dev/null
/proc/20518/mountinfo:259 239 0:85 /log /dev/log rw,nosuid,relatime shared:161 – devtmpfs devtmpfs rw,size=1792000k,nr_inodes=448000,mode=755

lsof -p 20518
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 30264 mysql cwd DIR 182,735569 4096 5768267 /var/lib/mysq

openvz limit smtp connection

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A FORWARD -s xx.xx.xx.xx/32-p tcp -m multiport –dports 25,587,465 -j LOG –log-prefix “FORWARD:DROP:” –log-level 6
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 465 -m limit –limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 587 -m limit –limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 25 -m limit –limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 465 -j DROP
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 587 -j DROP
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp –dport 25 -j DROP