Upgrade from Ubuntu 16.04 to Ubuntu 18.04 iptables issue
Posted: Thu Jan 16, 2020 12:29 pm
Hello,
I was thinking to upgrade my server to Ubuntu 18.04. I followed bellow guide:
https://linuxconfig.org/how-to-upgrade- ... nic-beaver
PLEASE MAKE A COPY OF YOUR SERVER INSTANCE BEFORE UPGRADE TO 18.04
I upgraded my server with minor issues. I fixed most of them (curl + roundcube) I have weird issue. After server boot, iptables are working but VestaCP shows grey out. I can manually start iptables from VestaCP. Ubuntu 16.04 sense iptables like a service but 18.04 not. If I run following command iptables service starts on control panel
v-restart-service iptables
But if I try service iptables status i see this:
Unit iptables.service could not be found.
If someone help me to fix this I really appreciate. After vesta service run my system should run this command "v-restart-service iptables"
I use Scaleway servers. I changed ssh login banner with proper one. If someone needed they can use it:
/etc/update-motd.d/50-scw
And /etc/scw-release
I was thinking to upgrade my server to Ubuntu 18.04. I followed bellow guide:
https://linuxconfig.org/how-to-upgrade- ... nic-beaver
PLEASE MAKE A COPY OF YOUR SERVER INSTANCE BEFORE UPGRADE TO 18.04
I upgraded my server with minor issues. I fixed most of them (curl + roundcube) I have weird issue. After server boot, iptables are working but VestaCP shows grey out. I can manually start iptables from VestaCP. Ubuntu 16.04 sense iptables like a service but 18.04 not. If I run following command iptables service starts on control panel
v-restart-service iptables
But if I try service iptables status i see this:
Unit iptables.service could not be found.
If someone help me to fix this I really appreciate. After vesta service run my system should run this command "v-restart-service iptables"
I use Scaleway servers. I changed ssh login banner with proper one. If someone needed they can use it:
/etc/update-motd.d/50-scw
Code: Select all
#!/bin/bash
export PATH="${PATH:+$PATH:}/bin:/usr/bin:/usr/local/bin"
[ -r /etc/lsb-release ] && . /etc/lsb-release
[ -r /etc/scw-release ] && . /etc/scw-release
if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi
date=`date`
load=`cat /proc/loadavg | awk '{print $1}'`
root_usage=`df -h / | awk '/\// {print $(NF-1)}'`
memory_usage=`free -m | awk '/Mem:/ { total=$2 } /buffers\/cache/ { used=$3 } END { printf("%3.1f%%", used/total*100)}'`
swap_usage=`free -m | awk '/Swap/ { printf("%3.1f%%", "exit !$2;$3/$2*100") }'`
users=`users | wc -w`
time=`uptime | grep -ohe 'up .*' | sed 's/,/\ hours/g' | awk '{ printf $2" "$3 }'`
processes=`ps aux | wc -l`
ip=`ifconfig eth0 | awk '{ print $2}' | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"`
public_ip=$(scw-metadata --cached PUBLIC_IP_ADDRESS)
metadata() {
scw-metadata --cached "$1"
}
volume_metadata() {
device=$1
key=$2
scw-metadata --cached "VOLUMES_${device}_${key}"
}
KERNEL_VERSION=$(uname -r)
if [[ $KERNEL_VERSION =~ ^3\.2\.[35][24].* ]]; then
KERNEL_TITLE="- Marvell"
fi
[ -f /etc/motd.head ] && cat /etc/motd.head || true
printf "\n"
printf "Welcome on %s (%s %s %s %s)\n" "${IMAGE_DESCRIPTION}" "$(uname -o)" "${KERNEL_VERSION}" "$(uname -m)" "$KERNEL_TITLE"
printf "\n"
printf "System information as of: %s\n" "$date"
printf "\n"
printf "System load:\t%s\t\tInt IP Address:\t%s %s\n" $load $ip
printf "Memory usage:\t%s\t\tPub IP Address:\t%s\n" $memory_usage $public_ip
printf "Usage on /:\t%s\t\tSwap usage:\t%s\n" $root_usage $swap_usage
printf "Local Users:\t%s\t\tProcesses:\t%s\n" $users $processes
printf "Image build:\t%s\tSystem uptime:\t%s\n" "${IMAGE_RELEASE}" "$time"
for i in {0..16}; do
metadata VOLUMES_${i} | grep " " >/dev/null || continue
SIZE=$(( $(volume_metadata $i SIZE) / 1000 / 1000 / 1000 ))G
printf "Disk nbd%s:\t%s\n" "$i" "$(volume_metadata $i VOLUME_TYPE) ${SIZE}"
done
printf "\n"
printf "Documentation:\t%s\n" "$IMAGE_DOC_URL"
printf "Community:\t%s\n" "$IMAGE_HELP_URL"
printf "Image source:\t%s\n" "$IMAGE_SOURCE_URL"
printf "\n"
[ -f /etc/motd.tail ] && cat /etc/motd.tail || true
Code: Select all
IMAGE_FLAVORS="common docker-based feature-motd systemd"
IMAGE_TOOLS_CHECKOUT="764a58e59811d5f6217a3f71a4e009d6ec3e5138"
IMAGE_ID="Ubuntu Bionic"
IMAGE_RELEASE=2018-07-06
IMAGE_CODENAME=ubuntu
IMAGE_DESCRIPTION="Ubuntu Bionic Beaver (18.04 LTS)"
IMAGE_HELP_URL="https://community.scaleway.com"
IMAGE_SOURCE_URL="https://github.com/scaleway/image-ubuntu"
IMAGE_DOC_URL="https://scaleway.com/docs"