Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configure NethServer 7 DC+VPNs on a dply.co VPS -- https://dply.co/b/h1hpfeRR
#!/bin/bash
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 http://mirror.nethserver.org/nethserver/nethserver-release-7.rpm
nethserver-install
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 255.255.255.0 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
@DavidePrincipi
Copy link
Author

DavidePrincipi commented Jul 12, 2017

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