UFW & Iptables not working in Debian 10
If you are getting an iptables related issue generally or when trying to use an OpenVPN installer script or general VPN setup and the error is similar to:
iptables-restore v1.8.4 (legacy): couldn't load match `limit':no such file or directory
iptables v1.8.2 (nf_tables): unknown option "--dport"
iptables v1.8.4 (nf_tables): unknown option "--dport"
error: couldn't determine iptables version
This quick tips post is aimed at hosts that use SolusVM and OpenVZ 7 or Virtuozzo 7.
I have probably had to answer this question around 30 times now so I thought I would make a quick blog post about it so it can be referred too by those that need it.
To build container config files solsuvm uses the file: /etc/vz/conf/ve-vswap-solus.conf-sample
The standard looks like this:
# Copyright (C) 2000-2011, Parallels, Inc. All rights reserved. # # This program is free software; you can redistr...
Written by: @AnthonySmith
Sometimes you want to perform the same action multiple times with a single variable, that may be a vps ID, a process ID or some other unique identifier.
Here are a few examples of how you do that with a simple script, obviously there are other ways and probably better ways to do some of these things they are simply examples to work with.
Copy files of a certain type to a server
#!/bin/sh PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin #find i...
In this post we will be looking at running top in batch mode, looking for a string with grep, grabbing the process id's with awk and sending the process id's to be processed by another command with xargs.
For speed, I have just set up a quick VPS and installed apache.
top in batch mode
top -b -n1
This command with do as it suggests run top in batch mode with the
-b switch, the
-n1 tells it to run 1 time,
-n5 would be 5 times.
Looking for a string with grep
We can pipe the out...