OpenVPN Error - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: VPS Support (https://post4vps.com/Forum-VPS-Support) +--- Thread: OpenVPN Error (/Thread-OpenVPN-Error) |
RE: OpenVPN Error - sagher - 04-16-2019 @Hidden Refuge i successfully done to make a openvpn server and at the end finally it's working. but one more thing is it has a rsa generated easy-rsa system but i need a password protected client file. whenever i start openvpn *.ovpn file. windows should ask for a password. how can i do that? RE: OpenVPN Error - Mashiro - 04-16-2019 You followed my guide for OpenVPN? The guide is focused on a more secure way to login at the VPN server. So basically like SSH public key authentication you use a certificate/key to login to the server (which also encrypts the whole traffic). I haven't been using OpenVPN for years. So I actually have no idea at this point how to convert it to use username and password again. RE: OpenVPN Error - sagher - 02-18-2021 Hello all experts. After a long time i try to install again Openvpn server in my container. but again i got following errors. cat /etc/rc.local file is unreachable. even not open with ftp. sudo systemctl daemon-reload Code: xxx@kvm-xxx:~# sudo systemctl daemon-reload sudo systemctl status rc-local Code: xxx@kvm-xxx:~# sudo systemctl status rc-local journalctl -xe Code: xxxx@kvm-xxx:~# journalctl -xe RE: OpenVPN Error - Pacific Spirit - 02-18-2021 Does your provider allow the use a VPN on their services, if so, you have to contact openvpn or your provider for it. If it's not allowed then you can try what you want but it wont ever work. RE: OpenVPN Error - sagher - 02-19-2021 (02-18-2021, 06:12 PM)Pacific Spirit Wrote: Does your provider allow the use a VPN on their services, if so, you have to contact openvpn or your provider for it. If it's not allowed then you can try what you want but it wont ever work. Yes. i use VPS-9, and i ran it for a long. but shut off since 1 year ago. and now i need it so i wish to install it again because all older configuration dismiss due to OS upgradation. RE: OpenVPN Error - Mashiro - 02-19-2021 rc.local is a relic from the times of init times. It was available for a time when the transition from init to systemd has been performed but nowadays rc.local is no longer really a thing. It looks like systemd has a rc.local compatible interface. So that means that you can most likely simply create a empty rc.local file in /etc and fill it with your code which should be run by systemd. Have you tried that already? Just creating the rc.local file yourself? Even in the times of init or the transition time of systemd the rc.local file was usually empty or only contained comments. So nothing you can really break. Apart from that why do you think that rc.local is the issue? You post that openvpn service returns an error but you didn't provide the journald entry with that error. Did you forget the include that information and there you found the rc.local issue? RE: OpenVPN Error - Pacific Spirit - 02-19-2021 (02-19-2021, 05:16 AM)sagher Wrote: Yes. i use VPS-9, and i ran it for a long. but shut off since 1 year ago. and now i need it so i wish to install it again because all older configuration dismiss due to OS upgradation. Did you enable TUN/TAB on your vps 9? This may cause the issue. RE: OpenVPN Error - sagher - 02-20-2021 (02-19-2021, 02:56 PM)Mashiro Wrote: rc.local is a relic from the times of init times. It was available for a time when the transition from init to systemd has been performed but nowadays rc.local is no longer really a thing. Yes i try it. but the problem is that file is already located in /etc but unable to open or remove. and ftp not allows me to create new one when already same file exist. RE: OpenVPN Error - sagher - 02-20-2021 (02-19-2021, 08:47 PM)Pacific Spirit Wrote: Did you enable TUN/TAB on your vps 9? This may cause the issue. Yes . that is a solid reason. i do open a ticket for it. i ll be back when i got confirmation. i also request you to kindly share with me full automated script for openvpn installer with easy-rsa key encryption. RE: OpenVPN Error - Pacific Spirit - 02-20-2021 (02-20-2021, 05:25 AM)sagher Wrote: Yes . that is a solid reason. i do open a ticket for it. i ll be back when i got confirmation. i also request you to kindly share with me full automated script for openvpn installer with easy-rsa key encryption. 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/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.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. |