liwen-ubuntu-firewall-vpn

by sunliwen
36 deployments · 5 still active · last rev. 3 years ago

Ubuntu+Security+VPN(L2TP+IPSec)

Sometimes PPTP will be blocked and L2TP+IPSec is better.
If need Nginx+Mysql+PHP, you can use #5711 which will install them together.

Test passed on 20130810 :)

Compatible with: No distros currently supported
Includes: liwen-ubuntu-lib
						#!/bin/bash

# By Sun Liwen <sunliwen@gmail.com>
# Feel free to donate beer if it's useful :)
 
######
#<udf name="SSH_PORT" label="SSH port" default="22">
#<udf name="USER_NAME" label="Unprivileged User Account" />
#<udf name="USER_PASSWORD" label="Unprivileged User Password" />
#<udf name="USER_SSHKEY" label="Public Key for User" default="" />
#<udf name="SSH_ALLOW_USERS" label="SSH Allow Users directive, leave blank if you don't know what this is" default="" />
#<udf name="ROOT_EMAIL" label="Email alias for root" />
#<udf name="HOSTNAME" label="Hostname" default="" />
#<udf name="WHICH_KERNEL" label="Use ubuntu virtual kernel?" oneOf="No,Yes" />
#<udf name="VPN_SERVICENAME" label="VPN Service Name" default="l2tp" example="l2tp" />
#<udf name="VPN_PSK" label="PSK" default="pre_shared_key" example="pre_shared_key" />
#<udf name="VPN_IPRANGE" label="IP Range" default="10.0.100" example="10.0.100" />
#<udf name="VPN_USERNAME" label="Username" />
#<udf name="VPN_PASSWORD" label="Password" />

######

set -e

source <ssinclude StackScriptID="5710">

#update system and set hostname
prep_system

#setup firewall
install_ufw

#setup standard user
configure_user

#secure ssh
configure_ssh

#setup postfix
install_postfix

#install monit/munin/security tools/other tools
install_monit
install_munin
install_security
install_tools
install_vpn

#set root .profile
set_root_profile

#cleanup
cleanup

#send notification
notification_email