Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Jun 2, 2026
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
AWS SSH tunnel
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="luk3r" data-source="post: 30338656" data-attributes="member: 580433"><p>1. Install OpenVPN and Easy-RSA</p><p></p><p>Update the package list and install OpenVPN along with Easy-RSA for managing SSL certificates.</p><p></p><p>sudo apt update</p><p>sudo apt install openvpn easy-rsa -y</p><p></p><p>2. Set Up the Public Key Infrastructure (PKI)</p><p></p><p>Create a directory for Easy-RSA and navigate to it:</p><p></p><p>make-cadir ~/openvpn-ca</p><p>cd ~/openvpn-ca</p><p></p><p>Initialize the PKI:</p><p></p><p>./easyrsa init-pki</p><p></p><p>Build the Certificate Authority (CA):</p><p></p><p>./easyrsa build-ca</p><p></p><p> You will be prompted to enter a password for the CA and some details. Provide relevant information.</p><p></p><p>3. Generate Server Certificate and Key</p><p></p><p>Create a certificate request and key for the server:</p><p></p><p>./easyrsa gen-req server nopass</p><p></p><p>Sign the server's certificate request:</p><p></p><p>./easyrsa sign-req server server</p><p></p><p>4. Generate Diffie-Hellman Key</p><p></p><p>Generate the Diffie-Hellman parameters for secure key exchange:</p><p></p><p>./easyrsa gen-dh</p><p></p><p>5. Generate Client Certificate and Key</p><p></p><p>Create a certificate and key for a client:</p><p></p><p>./easyrsa gen-req client1 nopass</p><p>./easyrsa sign-req client client1</p><p></p><p>6. Configure OpenVPN</p><p></p><p>Copy the generated files to the OpenVPN directory:</p><p></p><p>sudo cp ~/openvpn-ca/pki/ca.crt /etc/openvpn/</p><p>sudo cp ~/openvpn-ca/pki/private/server.key /etc/openvpn/</p><p>sudo cp ~/openvpn-ca/pki/issued/server.crt /etc/openvpn/</p><p>sudo cp ~/openvpn-ca/pki/dh.pem /etc/openvpn/</p><p></p><p>Create a server configuration file in /etc/openvpn/server.conf:</p><p></p><p>sudo nano /etc/openvpn/server.conf</p><p></p><p>Add the following configuration:</p><p></p><p>port 1194</p><p>proto udp</p><p>dev tun</p><p>ca ca.crt</p><p>cert server.crt</p><p>key server.key</p><p>dh dh.pem</p><p>server 10.8.0.0 255.255.255.0</p><p>ifconfig-pool-persist ipp.txt</p><p>push "redirect-gateway def1 bypass-dhcp"</p><p>push "dhcp-option DNS 8.8.8.8"</p><p>push "dhcp-option DNS 8.8.4.4"</p><p>keepalive 10 120</p><p>tls-auth ta.key 0</p><p>cipher AES-256-CBC</p><p>persist-key</p><p>persist-tun</p><p>status openvpn-status.log</p><p>log-append /var/log/openvpn.log</p><p>verb 3</p><p></p><p>7. Enable IP Forwarding</p><p></p><p>Edit the /etc/sysctl.conf file:</p><p></p><p>sudo nano /etc/sysctl.conf</p><p></p><p>Uncomment or add the following line:</p><p></p><p>net.ipv4.ip_forward=1</p><p></p><p>Apply the changes:</p><p></p><p>sudo sysctl -p</p><p></p><p>8. Start the OpenVPN Server</p><p></p><p>Enable and start the OpenVPN service:</p><p></p><p>sudo systemctl enable openvpn@server</p><p>sudo systemctl start openvpn@server</p><p></p><p>9. Set Up Firewall Rules</p><p></p><p>Allow traffic on the OpenVPN port and enable NAT:</p><p></p><p>sudo ufw allow 1194/udp</p><p>sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE</p><p></p><p>Persist the rules:</p><p></p><p>sudo apt install iptables-persistent -y</p><p>sudo netfilter-persistent save</p><p></p><p>10. Create Client Configuration</p><p></p><p>Generate a .ovpn file for clients. Create a configuration file, for example, client1.ovpn:</p><p></p><p>sudo nano client1.ovpn</p><p></p><p>Add the following content:</p><p></p><p>client</p><p>dev tun</p><p>proto udp</p><p>remote <your-server-ip> 1194</p><p>resolv-retry infinite</p><p>nobind</p><p>persist-key</p><p>persist-tun</p><p>remote-cert-tls server</p><p>cipher AES-256-CBC</p><p>auth SHA256</p><p>key-direction 1</p><p>verb 3</p><p></p><p><ca></p><p># Paste the contents of ca.crt here</p><p></ca></p><p><cert></p><p># Paste the contents of client1.crt here</p><p></cert></p><p><key></p><p># Paste the contents of client1.key here</p><p></key></p><p><tls-auth></p><p># Paste the contents of ta.key here</p><p></tls-auth></p><p></p><p>11. Distribute Configuration</p><p></p><p>Provide the client1.ovpn file to your client device for connection.</p><p></p><p>You now have a working OpenVPN server! Test connectivity from a client device using the generated .ovpn file.</p></blockquote><p></p>
[QUOTE="luk3r, post: 30338656, member: 580433"] 1. Install OpenVPN and Easy-RSA Update the package list and install OpenVPN along with Easy-RSA for managing SSL certificates. sudo apt update sudo apt install openvpn easy-rsa -y 2. Set Up the Public Key Infrastructure (PKI) Create a directory for Easy-RSA and navigate to it: make-cadir ~/openvpn-ca cd ~/openvpn-ca Initialize the PKI: ./easyrsa init-pki Build the Certificate Authority (CA): ./easyrsa build-ca You will be prompted to enter a password for the CA and some details. Provide relevant information. 3. Generate Server Certificate and Key Create a certificate request and key for the server: ./easyrsa gen-req server nopass Sign the server's certificate request: ./easyrsa sign-req server server 4. Generate Diffie-Hellman Key Generate the Diffie-Hellman parameters for secure key exchange: ./easyrsa gen-dh 5. Generate Client Certificate and Key Create a certificate and key for a client: ./easyrsa gen-req client1 nopass ./easyrsa sign-req client client1 6. Configure OpenVPN Copy the generated files to the OpenVPN directory: sudo cp ~/openvpn-ca/pki/ca.crt /etc/openvpn/ sudo cp ~/openvpn-ca/pki/private/server.key /etc/openvpn/ sudo cp ~/openvpn-ca/pki/issued/server.crt /etc/openvpn/ sudo cp ~/openvpn-ca/pki/dh.pem /etc/openvpn/ Create a server configuration file in /etc/openvpn/server.conf: sudo nano /etc/openvpn/server.conf Add the following configuration: port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway def1 bypass-dhcp" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 tls-auth ta.key 0 cipher AES-256-CBC persist-key persist-tun status openvpn-status.log log-append /var/log/openvpn.log verb 3 7. Enable IP Forwarding Edit the /etc/sysctl.conf file: sudo nano /etc/sysctl.conf Uncomment or add the following line: net.ipv4.ip_forward=1 Apply the changes: sudo sysctl -p 8. Start the OpenVPN Server Enable and start the OpenVPN service: sudo systemctl enable openvpn@server sudo systemctl start openvpn@server 9. Set Up Firewall Rules Allow traffic on the OpenVPN port and enable NAT: sudo ufw allow 1194/udp sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE Persist the rules: sudo apt install iptables-persistent -y sudo netfilter-persistent save 10. Create Client Configuration Generate a .ovpn file for clients. Create a configuration file, for example, client1.ovpn: sudo nano client1.ovpn Add the following content: client dev tun proto udp remote <your-server-ip> 1194 resolv-retry infinite nobind persist-key persist-tun remote-cert-tls server cipher AES-256-CBC auth SHA256 key-direction 1 verb 3 <ca> # Paste the contents of ca.crt here </ca> <cert> # Paste the contents of client1.crt here </cert> <key> # Paste the contents of client1.key here </key> <tls-auth> # Paste the contents of ta.key here </tls-auth> 11. Distribute Configuration Provide the client1.ovpn file to your client device for connection. You now have a working OpenVPN server! Test connectivity from a client device using the generated .ovpn file. [/QUOTE]
Insert quotes…
Verification
Payakata winadi keeyak tibeda?
Post reply
Top
Bottom