arrow_upward

Pages (3):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#21
I have debian 9 OS installed. will you please manage tutorial according to debian rules.
Also if you have any auto install.sh script kindly share
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#22
(02-20-2021, 09:02 AM)Pacific Spirit Wrote: OpenVPN is an open source virtual private network (VPN) software. Follow the steps below to configure OpenVPN on CentOS:

1. Install dependencies:

# yum install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel



2. Get OpenVPN:

# wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm

# wget http://dag.wieers.com/rpm/packages/rpmfo...x86_64.rpm

3. Prepare to install:

# rpmbuild --rebuild lzo-1.08-4.rf.src.rpm

# rpm -Uvh /usr/src/redhat/RPMS/x86_64/lzo-*.rpm

# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

4. Install OpenVPN:

# yum install openvpn

5. Copy the OpenVPN directory:

# cp -r /usr/share/doc/openvpn-2.2.0/easy-rsa/ /etc/openvpn/

6. Build SSL keys. When prompted for key information, you can simply press enter to bypass:

#cd /etc/openvpn/easy-rsa/2.0

#chmod 755 *

#source ./vars

#./vars

#./clean-all

#./build-ca

#./build-key-server server

#./build-dh

7. Create the OpenVPN config:

# cd /etc/openvpn

# vi server.conf

Copy the following sample config into the document, edit the IP address and port to your main IP address and desired port, then press ESC, then :wq and enter to save and exit the document.

local 123.123.123.123 #- change it with your server ip address

port 1234 #- change the port you want

proto udp #- protocol can be tcp or udp

dev tun

tun-mtu 1500

tun-mtu-extra 32

mssfix 1450

ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt

cert /etc/openvpn/easy-rsa/2.0/keys/server.crt

key /etc/openvpn/easy-rsa/2.0/keys/server.key

dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login

client-cert-not-required

username-as-common-name

server 10.8.0.0 255.255.255.0

push "redirect-gateway def1"

push "dhcp-option DNS 208.67.222.222"

push "dhcp-option DNS 4.2.2.1"

keepalive 5 30

comp-lzo

persist-key

persist-tun

status server-tcp.log

verb 3



8. Start OpenVPN:

# openvpn /etc/openvpn/server.conf

Check that it returns "Initialization Sequence Completed." If so, press ctrl-c to quit.

9. Setup NAT rules:

# echo 1 > /proc/sys/net/ipv4/ip_forward

# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 0.0.0.0

(Modify "0.0.0.0" to your server's IP)

Create a user to login to the VPN with:

#useradd username -s /bin/false

#passwd username



10. Create an OpenVPN config file on your local machine with name vpn1.ovpn, copy the sample below with your IP and port, and place it in your OpenVPN configurations folder:

client

dev tun

proto udp

remote 123.123.123.123 4567 #- your OPENVPN server ip and port

resolv-retry infinite

nobind

tun-mtu 1500

tun-mtu-extra 32

mssfix 1450

persist-key

persist-tun

ca ca.crt

auth-user-pass

comp-lzo

verb 3

11. Download ca.crt from /etc/openvpn/easy-rsa/2.0/keys to the same OpenVPN configs folder.

12. Start the VPN on the VPS:

# openvpn /etc/openvpn/server.conf

Log in to the VPN from your local machine (using OpenVPN or another desktop client) with the username/password you created.

HI.
Will you please attach the tutorial for debian.
i follow the first command for dependencies " install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel " and got this error

:~# apt-get install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rpm-build
E: Unable to locate package autoconf.noarch
E: Couldn't find any package by glob 'autoconf.noarch'
E: Couldn't find any package by regex 'autoconf.noarch'
E: Unable to locate package zlib-devel
E: Unable to locate package pam-devel
E: Unable to locate package openssl-devel
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#23
After applying install script i got this when activation services


[color=#66cc33]●[/color] [email protected] - OpenVPN connection to server
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
   Active: [color=#66cc33]active (running)[/color] since Tue 2021-02-23 02:23:50 EST; 8s ago
     Docs: man:openvpn(8)
           https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
           https://community.openvpn.net/openvpn/wiki/HOWTO
  Process: 3720 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --co
 Main PID: 3721 (openvpn)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-openvpn.slice/[email protected]
           └─3721 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --config /et

Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: Socket Buffers: R=[212992->212992] S=[212992->212992]
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: UDPv4 link local (bound): [AF_INET][undef]:1194
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: UDPv4 link remote: [AF_UNSPEC]
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: GID set to nogroup
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: UID set to nobody
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: MULTI: multi_init called, r=256 v=256
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: IFCONFIG POOL: base=10.8.0.2 size=252, ipv6=0
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: IFCONFIG POOL LIST
Feb 23 02:23:50 kvm-xxx ovpn-server[3721]: Initialization Sequence Completed
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#24
This might help @sager https://www.linuxcloudvps.com/blog/how-t...-debian-9/
Pages (3):
lockThread Closed 


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
1,059
11-27-2020, 02:53 AM
Last Post: Rehan
7,059
06-17-2020, 04:32 PM
Last Post: Mashiro
1,395
06-11-2020, 06:31 PM
Last Post: rudra
2,272
02-13-2020, 09:50 AM
Last Post: deanhills

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting