Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configure NethServer 7 DC+VPNs on a VPS --
export PATH="/sbin/e-smith:${PATH}"
NETWORKID=$(( $RANDOM % 32 + 103 ))
echo "Green network is 192.168.${NETWORKID}.0/24"
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
yum localinstall -y
yum install -y nethserver-dc nethserver-firewall-base-ui nethserver-openvpn nethserver-ipsec nethserver-ipsec-tunnels
db networks setprop eth0 role red
db networks set br0 bridge role green ipaddr 192.168.${NETWORKID}.1 netmask gateway ''
db networks set eth0.500 vlan role bridged bridge br0
signal-event interface-update
DNSDOMAIN=$(hostname -d)
NBDOMAIN=$(hostname -d | cut -f 1 -d .)
config setprop sssd Realm "AD.${DNSDOMAIN^^}" Workgroup "${NBDOMAIN^^}"
config setprop nsdc IpAddress 192.168.${NETWORKID}.2 status enabled bridge br0
signal-event nethserver-dc-save
Copy link

DavidePrincipi commented Jul 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment