3

On a fresh Ubuntu 16.04 LTS install after installing nginx, php, mysql I was trying to install ufw.

First, when I tried to allow Port 22/OpenSSH I came across an iptables error.

ERROR: initcaps
[Errno 2] iptables: Memory allocation problem.

After some research I tried the commands

iptables -F
iptables -X

and ran the command again. It now seemed to work.

Then i tried to run sudo nfw enable and I keep getting this error message unfortunately:

sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
ERROR: problem running ufw-init
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab127.2/modules.builtin.bin'
modprobe: FATAL: Module nf_conntrack_ftp not found in directory /lib/modules/4.4.0-042stab127.2
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab127.2/modules.builtin.bin'
modprobe: FATAL: Module nf_nat_ftp not found in directory /lib/modules/4.4.0-042stab127.2
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab127.2/modules.builtin.bin'
modprobe: FATAL: Module nf_conntrack_netbios_ns not found in directory /lib/modules/4.4.0-042stab127.2
iptables-restore: line 30 failed
iptables-restore: line 10 failed
iptables-restore: line 42 failed
iptables-restore v1.6.0: Couldn't load target `ufw-user-input':No such file or directory

Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
ip6tables-restore: line 42 failed
ip6tables-restore: line 2 failed
ip6tables-restore: line 8 failed
ip6tables-restore: line 138 failed
ip6tables-restore v1.6.0: Couldn't load target `ufw6-skip-to-policy-input':No such file or directory

Error occurred at line: 19
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
ip6tables-restore: line 10 failed
ip6tables-restore: line 42 failed
ip6tables-restore v1.6.0: Couldn't load target `ufw6-user-input':No such file or directory

Error occurred at line: 2
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
sysctl: permission denied on key 'net.ipv4.tcp_sack'

Problem running '/etc/ufw/after.rules'
Problem running '/etc/ufw/user.rules'
Problem running '/etc/ufw/before6.rules'
Problem running '/etc/ufw/after6.rules'
Problem running '/etc/ufw/user6.rules' 

I'm fairly new to this so I cannot really figure out what the problems are here.

Thank you!

Dom
  • 131
  • /lib/modules/4.4.0-042stab127.2 doesn't sound like part of a regular Ubuntu kernel - can you clarify your exact system? – steeldriver Feb 10 '18 at 22:23
  • Linux version 4.4.0-042stab127.2 (root@kbuild-rh6-x64.eng.sw.ru) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Thu Jan 4 16:41:44 MSK 2018

    In fact it's a server4you vServer and I restored it with "Ubuntu 16.04 LTS minimal" settings.

    – Dom Feb 10 '18 at 22:42
  • I see two very similar issues. Here the VM hoster does not support all modules. And Here reinstalling the linux-image did solve the issue. – Bob Feb 11 '18 at 05:49
  • Thanks. Meanwhile I found out that Virtuozzo doesn't seem to support Docker and my VM is running Virtuozzo. Since it's a fresh VM I might as well take a Digital Ocean Droplet for the same price - they're running KVM. – Dom Feb 11 '18 at 17:51

0 Answers0