Last active
July 12, 2017 13:16
-
-
Save DavidePrincipi/5907bf4bc122e44c842ec46f66958829 to your computer and use it in GitHub Desktop.
Configure NethServer 7 DC+VPNs on a dply.co VPS -- https://dply.co/b/h1hpfeRR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also the howto on
http://community.nethserver.org/t/configure-nethserver-7-dc-vpns-on-a-dply-co-vps/7369