Install nethserver in container via proxmox

NethServer Version: NethServer release 7.3.1611 (rc3)

I am using proxmox for virtualization. Proxmox can create virtual machines via kvm or containers.
Actually I use nethserver installed in a vm in kvm via proxmox
But I will like to probe nethserver via container via proxmox.

there are templates in proxmox for several solutions but I can not see a template for nethserver.
In theory increase the performance via containers

are there a time in that you would make e a template for proxmox?

IMHO you’d use a centos template

1 Like

Thanks Stefano, buy my question is if are there a template for nethserver for proxmox.
the idea is only install the template and not install nethserver after install centos

I think it does not exist… starting from a centos template is, IMO, straightforward…

@Stefano_Zamboni I’m currently trying to install nethserver7 in proxmox 5.1-43 and I’m having trouble with the installation

This is what I’ve done:

Create the CT with this configuration using the template centos-7-default_20171212_amd64.tar.xz:

arch: amd64
cores: 4
hostname: odin
memory: 1024
nameserver: ###.###.###.###
net0: name=eth0,bridge=vmbr0,gw=###.###.###.###,hwaddr=##:##:##:##:##:##,ip=###.###.###.###/24,type=veth
ostype: centos
rootfs: local-zfs:subvol-109-disk-2,size=20G
searchdomain: durero.lan
swap: 1024

Start the CT and enter:

pct start 109
pct enter 109

Configure the CT like this:

# Fix timezone
timedatectl set-timezone America/Havana

# Insert this into /etc/profile to enable global proxy
############################################################################################

# Define global proxy
MY_PROXY_URL="http://###.###.###.###:####/"
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy 

############################################################################################
# To enable it right away
source /etc/profile


# Insert this into /root/.bashrc to enable console autocompletion
############################################################################################

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

############################################################################################
# To enable it right away
source /root/.bashrc

# Insert this into /root/.inputrc to enable console autocompletion
############################################################################################

# mappings for making up and down arrow searching through history:
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
"\e[1;5C": forward-word
"\e[1;5D": backward-word

#Use [Tab] and [Shift]+[Tab] to cycle through all the possible completions:
"\t": menu-complete
"\e[Z": menu-complete-backward

############################################################################################
# To enable it right away
source /root/.inputrc

# Update system 
yum update

# Install man pages, nano, ssh, command autocompletion
yum install man-pages man nano openssh-server openssh-clients bash-completion

# Reset ssh to enable Key-Based Authentication
systemctl restart sshd

# Enable NethServer software repositories
yum localinstall -y http://mirror.nethserver.org/nethserver/nethserver-release-7.rpm

# Install the base system
nethserver-install

Before execute nethserver-install I can connect to the CT via ssh and I can ping the CT. After the installation both things stops working, and the file /etc/sysconfig/network-scripts/ifcfg-eth0 no longer exist Also I cannot connect to the server using port 980 on the server ip

One more thing I decided to check open ports with netstat -lanp | grep 980 and I found this:

tcp6       0      0 :::980                  :::*                    LISTEN      269/httpd           

So I disable the firewall using

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X

And only then I was able to use ssh, ping and connect to the web interface on port 980 However netstat -lanp | grep 980 is showing this :

tcp6       0      0 :::980                  :::*                    LISTEN      269/httpd           
tcp6       0      0 192.168.9.9:980         192.168.9.69:45470      TIME_WAIT   - 

tcp6 in a ip4 address ? Is this possible?

I try to create a Nethserver 7.9 LCX Proxmox Container and have the same problem with the Firewall/open Ports…

When I use the iptables commands it works just until the next reboot. Is there a way to make the changes permanent?

Sorry for the late response.

After setting the iptables you have to save them to a file

iptables-save > /etc/iptables/rules.v4
ip6tables-save > /etc/iptables/rules.v6

For making them persistent you have to install iptables-persistent

apt-get install iptables-persistent

it loads the files rules.v4 and rules.v6 automatically at startup.

I’ve found this solution at the following site:

4 Likes