mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-24 05:56:08 +03:00
Added options:
- set the ip of the listening server - set the network forward enabled / disabled
This commit is contained in:
parent
c0f0d47a64
commit
a6d6904ca8
@ -206,6 +206,11 @@ else
|
|||||||
echo "What port do you want OpenVPN listening to?"
|
echo "What port do you want OpenVPN listening to?"
|
||||||
read -p "Port: " -e -i 1194 PORT
|
read -p "Port: " -e -i 1194 PORT
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "What IP do you want OpenVPN listening to?"
|
||||||
|
read -p "Port: " -e -i 10.8.0.0 OPENVPNHOST
|
||||||
|
echo ""
|
||||||
|
read -r -p "Do you want to tunnel all traffic thru VPN? [y/N] " REDIRECT
|
||||||
|
echo ""
|
||||||
echo "Which DNS do you want to use with the VPN?"
|
echo "Which DNS do you want to use with the VPN?"
|
||||||
echo " 1) Current system resolvers"
|
echo " 1) Current system resolvers"
|
||||||
echo " 2) Google"
|
echo " 2) Google"
|
||||||
@ -267,9 +272,16 @@ dh dh.pem
|
|||||||
auth SHA512
|
auth SHA512
|
||||||
tls-auth ta.key 0
|
tls-auth ta.key 0
|
||||||
topology subnet
|
topology subnet
|
||||||
server 10.8.0.0 255.255.255.0
|
server $OPENVPNHOST 255.255.255.0
|
||||||
ifconfig-pool-persist ipp.txt" > /etc/openvpn/server.conf
|
ifconfig-pool-persist ipp.txt" > /etc/openvpn/server.conf
|
||||||
|
case "$REDIRECT" in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
echo 'push "redirect-gateway def1 bypass-dhcp"' >> /etc/openvpn/server.conf
|
echo 'push "redirect-gateway def1 bypass-dhcp"' >> /etc/openvpn/server.conf
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# do_something_else
|
||||||
|
;;
|
||||||
|
esac
|
||||||
# DNS
|
# DNS
|
||||||
case $DNS in
|
case $DNS in
|
||||||
1)
|
1)
|
||||||
|
Loading…
Reference in New Issue
Block a user