I need help whit commands opnvpn

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
HoracioRed192
OpenVpn Newbie
Posts: 1
Joined: Thu Dec 14, 2017 2:19 pm

I need help whit commands opnvpn

Post by HoracioRed192 » Thu Dec 14, 2017 2:42 pm

Hi
How use this command --up cmd?
I need run a script determinate user, but the comand "scritp security 2 up /serverUp.sh", dont run whit he target user, only run whit start service openvpn.

serverUp.sh

Code: Select all


#!/bin/sh
echo "ON VPNServer"
sudo etherwake -i wlan0 B4:B5:2F:B8:1C:2F

etc/openvpn/server.conf

Code: Select all

dev tun
proto udp
port 5194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server_YkBKLOJfMuWKix8s.crt
key /etc/openvpn/easy-rsa/pki/private/server_YkBKLOJfMuWKix8s.key
dh /etc/openvpn/easy-rsa/pki/dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OPenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
push "route 0.0.0.0 "
# Set your primary domain name server address for clients
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
keepalive 10 120
remote-cert-tls client
tls-version-min 1.2
tls-auth /etc/openvpn/easy-rsa/pki/ta.key 0
cipher AES-256-CBC
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
log /var/log/openvpn.log
verb 1
# Generated for use by PiVPN.io
script-security 2
up /etc/openvpn/serverUp.sh
PD: Sorry me bad inglish :roll:

Post Reply