Sunday, December 1, 2013

Toshiba Touchpad Not Working Solution

Toshiba Satellite Laptop

I have a Toshiba Satellite laptop, and sometimes the touchpad stops working out of nowhere. If your Toshiba touchpad is not working, and you're unable to move the cursor, follow the below instructions to fix your touchpad:

  1. Turn Off the laptop.
  2. Unplug the power cord and all the attached devices.
  3. Remove the battery.
  4. Press and hold the power button for 20 seconds.
  5. Insert the battery again and plug the power cord.
  6. Turn on the laptop and press F2 at the start screen to enter the BIOS setup.
  7. Press F9 to reset the settings to the default.
  8. Press F10 to save and exit the BIOS setup.
  9. Your computer will restart, and your touchpad should be working again.

Comment below and let us know if it worked for you!


Tuesday, October 15, 2013

Automatically Backup GoDaddy Files and Databases


Go Daddy


What is GoDaddy?

Go Daddy is an internet domain registrar and a web hosting company. The web hosting varies between shared hosting, Virtual Private Server (VPS) and dedicated servers.

Introduction

In a shared hosting environment, Go Daddy offers a one week backup for all the files, and allows a customer to rollback and restore any of those backups.

However, Go Daddy does not backup the databases, which contains most of the website's crucial information, such as customers database, dynamic pages, transactions and so on.

The below script was built to backup Go Daddy websites and their databases on a shared host. Also, with a slight modification, the script should also work for any other host.

How to Backup Files and Databases?

In order to successfully back the websites' files and databases, few information are needed, which can be found in the "Databases" section of your host panel:
  • Database(s) host
  • Database(s) name
  • Database(s) user
  • Database(s) password
Those information should be written in the script, under the ##### Database Configuration ##### section. Assuming we have two databases, each with a different host, name, user and password. Then we write them as follows:
dbHost[0]='localhost'
dbName[0]='database1'
dbUser[0]='user'
dbPass[0]='myhardtoguesspassword'

dbHost[1]='db.domain.com'
dbName[1]='database1'
dbUser[1]='myusername'
dbPass[1]='password'

It doesn't how many databases there are, every database information should be written in its own section.
For example, first database would be written in:
dbHost[0]=' '
dbName[0]=' '
dbUser[0]=' '

dbPass[0]=' '

Second database in:
dbHost[1]=' '
dbName[1]=' '
dbUser[1]=' '
dbPass[1]=' '

Third database in:
dbHost[2]=' '
dbName[2]=' '
dbUser[2]=' '
dbPass[2]=' '

The Entire Script

Simply fill the ################ Configuration ############### section in the script and upload it to your server using ftp.

The entire script can be found below, or on my github:
#!/bin/bash
###################### Configuration ######################

#Store the backups in the following directory
#Note: Always backup your data outside of your public_html or html directory. This will ensure your backup files won't be accessed publicly from a browser.
#Example:
#backupDirectory="backup/mybackupfiles"
backupDirectory="backup"

##### Database Configuration #####
#Databases Information
#You can add as much databases information as you wish
#The database information should be incremental and follow the below format:
#############
#dbHost[0]=''
#dbName[0]=''
#dbUser[0]=''
#dbPass[0]=''
#
#dbHost[1]=''
#dbName[1]=''
#dbUser[1]=''
#dbPass[1]=''
#
#dbHost[2]=''
#dbName[2]=''
#dbUser[2]=''
#dbPass[2]=''
#############
#
#
#Example:
##################################
#dbHost[0]='localhost'
#dbName[0]='database1'
#dbUser[0]='user'
#dbPass[0]='myhardtoguesspassword'
#
#dbHost[1]='db.domain.com'
#dbName[1]='database1'
#dbUser[1]='myusername'
#dbPass[1]='ghjkkjh2678(27'
##################################

dbHost[0]=''
dbName[0]=''
dbUser[0]=''
dbPass[0]=''

dbHost[1]=''
dbName[1]=''
dbUser[1]=''
dbPass[1]=''

dbHost[2]=''
dbName[2]=''
dbUser[2]=''
dbPass[2]=''

#Compress Databases (On=1 / Off=0)
compressDatabases=1

##### Files Configuration #####
#Directory (and subdirectories) to backup. By Default, the godaddy public directory is called "html"
filesPath='html'

#Archive files as Zip(0) or Tar(1)
ZipOrTar=1

#Compress Files in Archive? (On=1, Off=0)
#Note: Godaddy scripts are usually interrupted after a specific time. Compressing/deflating the files will take more time to complete. Use zero if you have a huge website and the script is always interrupted.
compressFiles=0

##### FTP Configuration #####
#Note: Using FTP is not secure, use it at your own risk. Your password will be stored in this file in plain text, and can be read by a simple ps command upon execution by others.
#Godaddy blocks most of the outbound ports, including port 21. If you have a FTP with an unblocked port, you can use this option, otherwise keep it disabled.
#Enable FTP Transfer (Yes=1 / No=0)
enableFtpTransfer=0

#FTP Host
FtpHost=''

#FTP Port
FtpPort=''

#FTP User
FtpUser=''

#FTP Password
FtpPass=''

#FTP Path
FtpPath=''


################# End Of Configuration ###################


################# Script Execution ###################

### Edit at your own risk ###

#Store Current Date
Date=`date '+%m-%d-%Y_%H-%M'`

#Create Final Backup Directory
backupDirectory="$backupDirectory/$Date"

#Check if backup directory exist, otherwise create it
if [ ! -d "$HOME/$backupDirectory" ]
then
    mkdir -p $HOME/$backupDirectory/
    echo "Directory Created"
fi

#Backup Databases
for i in ${!dbHost[@]}
do
  if [ $compressDatabases -eq 1 ]
    then
      filename[i]="$HOME/$backupDirectory/${dbName[$i]}_$Date.sql.gz"
      mysqldump -h ${dbHost[$i]} -u ${dbUser[$i]} -p${dbPass[$i]} ${dbName[$i]} | gzip > ${filename[i]}
    else
      filename[i]="$HOME/$backupDirectory/${dbName[$i]}_$Date.sql"
      mysqldump -h ${dbHost[$i]} -u ${dbUser[$i]} -p${dbPass[$i]} ${dbName[$i]} > ${filename[i]}
  fi
done


#Backup Files
cd $HOME/$filesPath

#Zip
if [ $ZipOrTar -eq 0 ]
then
    if [ $compressFiles -eq 0 ]
    then
        filesname="$HOME/$backupDirectory/files_$Date.zip"
        zip -r -0 $filesname * .[^.]*
    else
        filesname="$HOME/$backupDirectory/files_$Date.zip"
        zip -r -9 $filesname * .[^.]*
    fi
fi

#Tar
if [ $ZipOrTar -eq 1 ]
then
    if [ $compressFiles -eq 0 ]
    then
        filesname="$HOME/$backupDirectory/files_$Date.tar"
        tar -cvf $filesname .
    else
        filesname="$HOME/$backupDirectory/files_$Date.tar.gz"
        tar -zcvf $filesname .
    fi
fi


#FTP Transfer
if [ $enableFtpTransfer -eq 1 ]
then
    if [ "$FtpPath" == "" ]
    then
        FtpPath="$Date"
    else
        FtpPath="$FtpPath/$Date"
    fi
#Upload Database(s)
ftp -nv $FtpHost $FtpPort  << END
user $FtpUser $FtpPass
mkdir $FtpPath
cd $FtpPath
lcd $HOME/$backupDirectory
mput *
bye
END
fi

If you are a windows user, your script might not run correctly on GoDaddy servers, since GoDaddy servers use linux operating system.
There are many tools and ways to convert DOS files to Unix files. The one I use is by logging in using SSH, browsing to the location of the script file and editing it:
vim filename

Once the text editor opens, type:
:set ff=unix
:w
:q
First line will convert from DOS to Unix, second line will save the file and third will quit the editor.

The bash script file should also be executable, make sure it has a 744 permissions or above.

Automatic Backup and Cron Job

In order to run the script automatically, a cron job needs be setup. To setup a Cron job, go to your Web Hosting Panel, and search for "Cron Job Manager"
 
Godaddy Cron Job Manager

Create a new cron job, and choose how often do you want the backup to occur, in my case, I chose weekly at 12pm.
$HOME means your hosting home directory, and backup.sh is the name of the script file. In my case, the script is outside the "html" directory.





Questions or Comments? I will gladly answer!

Sunday, September 1, 2013

Installing OpenERP on CentOS 6


openerp logo

What is OpenERP?

OpenERP is an open source full suite of Business software, and is published under the AGPL license. 
OpenERP contains over 700 modules such as sales management, Customer Relationship Management (CRM), warehouse management, association, project management, human resources management, point of sales and around

Installing OpenERP on CentOS 6

Installing OpenERP on CentOS can be tricky due to the lack of documentations. Most of the documentations are for Ubuntu/Debian distro.

OpenERP requires Python and PostgreSQL to run.

First step is to update the OS System & Packages
yum -y update

Installing wget in case it's not installed

yum -y install wget

Downloading the epel-release (Extra Packages for Enterprise Linux) and installing the packages

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Downloading the PostgreSQL and installing the packages
rpm -ivh http://yum.pgrpms.org/9.1/redhat/rhel-6Server-x86_64/pgdg-redhat91-9.1-5.noarch.rpm

Installing Packages & Dependencies

yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz python-matplotlib python-babel python-mako python-dateutil python-psycopg2 pychart pydot python-reportlab python-devel python-imaging python-vobject hippo-canvas-python mx python-gdata python-ldap python-openid python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib python python-devel python-psutil python-docutils make automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree postgresql91-libs postgresql91-server postgresql91 libxslt-devel

Initializing PostgreSQL
service postgresql-9.1 initdb

Allowing remote access to PostgreSQL
echo "listen_addresses = '*'" >> /var/lib/pgsql/9.1/data/postgresql.conf

By Default, PostgreSQL refuses all connections, so we have to add the IP addresses and subnet.
You can replace 0.0.0.0/0 by your IP address and subnet mask to allow access from a certain IP address.

echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/9.1/data/pg_hba.conf

Starting PostgreSQL
service postgresql-9.1 start

Starting PostgreSQL after every reboot
chkconfig postgresql-9.1 on

Creating PostgreSQL user and database
su - postgres -c "createuser --pwprompt --createdb --no-createrole --no-superuser openerp"

Downloading the Python client library for Google data APIs
cd /tmp
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip
Unziping and Installing it
unzip gdata-2.0.17.zip
rm -rf gdata-2.0.17.zip
cd gdata*
python setup.py install

 Adding OpenERP user to work with OpenERP. Never use root!
adduser openerp

Creating runtime directory and log directory and changing the owner to the previous created user
mkdir /var/run/openerp
mkdir /var/log/openerp
chown openerp.openerp /var/run/openerp

If a previous version of openerp exists, remove it
rm -rf openerp*

Downloading OpenERP, extracting it to a directory called "openerp", and installing it
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
tar -zxvf openerp-7.0-latest.tar.gz  --transform 's!^[^/]\+\($\|/\)!openerp\1!'
cd openerp
python setup.py install

If OpenERP was previously installed, remove it
rm -rf /usr/local/bin/openerp-server

Copy configuration files from OpenERP directory to their correct destination
cp openerp-server /usr/local/bin
cp install/openerp-server.init /etc/init.d/openerp
cp install/openerp-server.conf /etc
chmod u+x /etc/init.d/openerp

Start OpenERP after every reboot
chkconfig openerp on
Start OpenERP
service openerp start


That's it!
You should be able to access OpenERP on your server's IP, port 8069
xxx.xxx.xxx.xxx:8069

And you should see a screen like this:

OpenERP on CentOS 6


Have some questions? Leave us a comment below!

Monday, April 1, 2013

Installing ruTorrent on CentOS and Debian


ruTorrent Logo

What is a Seedbox?

Simply, a seedbox is a server used for downloading and uploading files. A seedbox is usually used to run and download torrents which can later be downloaded through FTP.
Seedboxes have a very fast internet connection (100 mbps, 1gbps...)

I'm going to use a script to auto install everything to avoid some hardcore configurations. This is the quickest method of turning a server into a seedbox. It was tested on a fresh CentOS6 64 bit installation and a fresh Debian6 64 bit installation. The server has 256 MB RAM and 512 MB Burst RAM, although 256MB should be fine.


Installing ruTorrent on CentOS 6


First let's update all our current packages:
yum update
Make sure wget is installed to download the installer:
yum install wget
Then we download the installer:
wget --no-check-certificate https://raw.github.com/etiennerached/rutorrent-auto-installer-centos/master/rutorrent-installer.sh
And run it:
sh rutorrent-installer.sh

The installer will start, you can keep the default settings by pressing enter, or just choose the ones you want.
I'm going to use Apache as the web server and install ruTorrent to manage the torrents from a web interface.
 
Seedbox Installation

Next, we create a torrent user, I will call mine "tor" for this tutorial. And we install the FTP server with a secure encrypted connection (FTPES), I will choose port number 666.

If you would like to manage your server from a web-interface, you can install webmin, which by default will run on port 10000.
Seedbox Installation

After choosing all the settings, we press Enter to install and configure. This might take around 5 minutes, depending on the server speed. If Webmin is to be installed, more configuration has to be done after few minutes, pressing enter and leaving the default value is OK.

To access the webinterface, go to your-domain-name/rutorrent, or Server-IP-Address/rutorrent, enter the username you chose (tor in my case) and the password.

ruTorrent Interface

To access the FTP, make sure you choose the port number that was selected during the installation (666 in this tutorial), and select FTP over explicit TLS or SSL. Make sure you accept the certificate. The downloaded files will be located in the downloads directory.
Ftp



Happy Torrenting!



Installing ruTorrent on Debian 6

First let's update all our current packages:
apt-get update
Then we download the installer:
wget --no-check-certificate https://raw.github.com/etiennerached/rutorrent-auto-installer-centos/master/rutorrent-installer.sh
And run it:
sh rutorrent-installer.sh
or
sudo rutorrent-installer.sh

The installer will start, you can keep the default settings by pressing enter, or just choose the ones you want.
I'm going to use Apache as the web server and install ruTorrent to manage the torrents from a web interface.
 
Seedbox Installation

Next, we create a torrent user, I will call mine "tor" for this tutorial. And we install the FTP server with a secure encrypted connection (FTPES), I will choose port number 666.

If you would like to manage your server from a web-interface, you can install webmin, which by default will run on port 10000.
Seedbox Installation

After choosing all the settings, we press Enter to install and configure. This might take around 5 minutes, depending on the server speed. If Webmin is to be installed, more configuration has to be done after few minutes, pressing enter and leaving the default value is OK.

To access the webinterface, go to your-domain-name/rutorrent, or Server-IP-Address/rutorrent, enter the username you chose (tor in my case) and the password.

ruTorrent Interface

If the webinterface is not loaded correctly, try to re-install irssi.

sudo apt-get install irssi

To access the FTP, make sure you choose the port number that was selected during the installation (666 in this tutorial), and select FTP over explicit TLS or SSL. Make sure you accept the certificate. The downloaded files will be located in the downloads directory.
FTP Login


Note:

If you get the below error when you access rutorrent:
AutodlIrssiTab._getNewLines: Exception info: name = TypeError; message = $.browser is undefined; fileName = https://xxx.xxx.xxx.xxx/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js; lineNumber = 28;
or
Error downloading files. Make sure autodl-irssi is started and configured properly (eg. password, port number): AutodlFilesDownloader.downloadAllFiles: Exception info: name = TypeError; message = $.browser is undefined; fileName = https://xxx.xxx.xxx.xxx/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js; lineNumber = 28;

Go back to SSH and type the following command:
vi /var/rutorrent/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js
Press "i" to go into editing mode, and replace:
if ($.browser.msie)
with
if ($.browser={ msie: ( navigator.appName == 'Microsoft Internet Explorer') ? true : false })
Press ESC to exit editing mode. Press :w to save. Press :q to quit.



If you are on CentOS 7:
Apache and mod_scgi does not work well on CentOS 7 yet. If you are on CentOS 7 You should choose nginx for now while installing.

And make sure to allow the http/https ports in the firewall:
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload


Happy Torrenting!



Have some questions? Leave us a comment below!

Wednesday, January 9, 2013

Installing and Configuring OpenVPN on CentOS 6


Open VPN Logo

What is VPN?

A VPN (Virtual Private Network) is a way to securely extend a private network across the internet to another location. The client computer (in this case your computer) makes an encrypted connection to a server which acts as a normal network connection. This technique is usually used in companies to allow their employees to securely connect to their work network from anywhere in the world.

VPNs provide security through tunneling protocols. The security model provides confidentiality which encrypts the data and protect it from being sniffed out, integrity which prevent the data from being tampered with and authentication which allow only authenticated users with a username and password to connect to the vpn server.

When a VPN connection is established, it can be considered like having an Ethernet cable connected to the other machine, just a little bit slower since it is going over the internet.


What is OpenVPN?

OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point oconnections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls.


Requirements

  • Server:
    • Linux CentOS 6 Operating System
    • Root access
  • Client:
    • Windows Operating System


Installing OpenVPN on CentOS 6

Make sure Tun/Tap is enabled
cat /dev/net/tun
If Tun/Tap is enabled and active you will see the following message:
cat: /dev/net/tun: File descriptor in bad state
If you don't see the above message, you will have to enable Tun/Tap or ask your host to enable it for you.

Install the following packages
yum install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel -y

Download LZO RPM and Configure the Repo
wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm

For CentOS 6 - 32 bit:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.i686.rpm
For CentOS 6 - 64 bit:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Build the RPM
rpmbuild --rebuild lzo-1.08-4.rf.src.rpm
rpm -Uvh lzo-*.rpm
rpm -Uvh rpmforge-release*

Install OpenVPN
yum install openvpn -y

Copy the easy-rsa folder to /etc/openvpn/
cp -R /usr/share/doc/openvpn-2.2.2/easy-rsa/ /etc/openvpn/

Edit the vars file:
vi  /etc/openvpn/easy-rsa/2.0/vars
Replace the line:
export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA`
by
export KEY_CONFIG=/etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf
and save (:w) and quit editing the file (:q)


Create the SSL Certificate

Create the SSL Certificate
cd /etc/openvpn/easy-rsa/2.0
chmod 755 *
source ./vars
./vars
./clean-all

Build your own root Certificate Authority (CA), you will be prompted to enter the Country name, State, City, Organization, Common, Email. You can enter any random data or leave them blank.
./build-ca

Build your Key Server, you will be prompted to enter the same info as before, you can leave them blank. The only 2 required are sign the certificate (choose "y") and 1 out of 1 certificate requests (choose "y")
./build-key-server server
sign the certificate: y
1 out of 1 certificate requests: y

Build Diffie Hellman Parameters (necessary for the server end of a SSL/TLS connection).
./build-dh


Configuring OpenVPN

Create the configuration file:
vi /etc/openvpn/server.conf

Copy/paste the following, you can choose any port number you want:
port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
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 #- Comment this line if you are using FreeRADIUS
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS
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 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3
and save (:w) and quit editing the file (:q)

Start OpenVPN
 service openvpn start

Enable IP Forwarding
vi /etc/sysctl.conf
Change
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1
and save (:w) and quit editing the file (:q)


Run sysctl to configure kernel parameters at runtime and make the changes take effect immediately
sysctl -p


Create a linux username to use it with VPN
useradd userone -s /bin/false
And set the password
passwd userone

If you want the OpenVPN to start after every reboot, issue the following command
chkconfig openvpn on


Configuring IPTables and CSF

If you are running Xen or KVM, issue this command:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
If you are running OpenVZ, run the following command, make sure to replace xxx.xxx.xxx.xxx by your server's IP address:
iptables -t nat -A POSTROUTING -o venet0 -j SNAT --to-source xxx.xxx.xxx.xxx
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source xxx.xxx.xxx.xxx

Save ip tables
service iptables save

If you have CSF/LFD installed on your server, you will have to create a new file to add new rules to your IP tables.
vi /etc/csf/csfpre.sh

Copy Paste the following into csfpre.sh, make sure to replace xxx.xxx.xxx.xxx by your server's IP address:
iptables -A INPUT -j ACCEPT -s 10.8.0.0/24 -i tun0
iptables -A OUTPUT -j ACCEPT -s 10.8.0.0/24 -o tun0
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -i tun0
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -o tun0
iptables -t nat --flush
iptables -t nat -A POSTROUTING -o venet0 -s 10.8.0.0/24 -j SNAT --to xxx.xxx.xxx
and save (:w) and quit editing the file (:q)

Modify CSF configuration file to allow the port number you chose earlier
vi /etc/csf/csf.conf
and save (:w) and quit editing the file (:q)

Restart CSF
csf -r


Downloading, installing and configuring the client

Download the windows installer openVPN from openvpn.net

Install the application

Go to Config directory where you installed OpenVPN (C:\Program Files (x86)\OpenVPN\config by default)

Create a new file called server.ovpn and open it with any text editor.

Paste the following into your server.ovpn, make sure to replace xxx.xxx.xxx.xxx by your server's IP address, and replace 1194 by the port number you chose earlier.
client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1194
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
reneg-sec 0
verb 3

Download the ca.crt and copy it to the same folder as server.ovpn

If you can't download ca.crt, open it from your server
vi /etc/openvpn/easy-rsa/2.0/keys/ca.crt
Copy it's content, create a new text file in your config directory and paste it. Rename the text file to ca.crt


Open the client, make sure to run as administrator, and enter the username and password you created earlier.

If you would like to save the username and password to prevent authenticating everytime you want to establish a VPN connection, you can achieve so by creating a new text file, name it anything you want with an extension of your choice. I will create my file with the name login.conf. Open this file with a text editor, on the first line enter the username, and on the second line the password.

For example, create a file called login.conf, open it with a text editor and write the following:
username
GJASk2398nm$^2389hknasDG
where username is the username and GJASk2398nm$^2389hknasDG is the password.

Save that file (login.conf) in the same folder as server.ovpn (that is in the config folder (C:\Program Files (x86)\OpenVPN\config by default))

Open your server.ovpn file, and next to auth-user-pass, add login.conf, so the line would become like this:
auth-user-pass login.conf