Articles for Linux

How to public any service without public ip using OPENVPN.

How to public any service without public ip using OPENVPN.

Some time we want to publish our website or any service from our desktop to internet . Then we require public IP to publish our services on the internet.

So resolve this issue we can user third party services like PORTMAP.IO  this gives you ability to publish your services over the internet using OPEN VPN Client.

For more information visit there website https://portmap.io/

How to configure SSL VPN on OPENVPN

How to configure SSL VPN on OPENVPN

If you want to configure openvpn on SSL port below are the example for server and client side.

Server side configuration

local 192.168.1.250
port 443
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
#server-ipv6 fddd:1194:1194:1194::/64
#push "redirect-gateway def1 ipv6 bypass-dhcp"  ## To avoid all internet traffic except VPN## 
push "route 192.168.29.0 255.255.255.0"         ## To advertise Network ##
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 192.168.29.254"
#push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
cipher AES-256-CBC
user nobody
duplicate-cn                                    ##To use single certificate for multiple user#
group nobody
persist-key
persist-tun
verb 3
crl-verify crl.pem

Continue reading How to configure SSL VPN on OPENVPN

How to setup your IT Infrastructure for Work From Home

How to setup your IT Infrastructure for Work From Home in low cost with open source secure industry standard technologies.

Here I am going to talk about talk about small and medium size offices and companies who are not able to invest big amount to upgrade or migrate there IT infrastructure  for there workers to work from home in the COVID pandemic .

There are few things mostly you are using in the office as IT infrastructure as end user. if that IT infrastructure is available at your home then mostly people can work from home easily.

I am taking a small office example scenario with 30 employees which  you require to work from home.

Simple small office network diagram .

Continue reading How to setup your IT Infrastructure for Work From Home

centos 5.11 yum repository

centos 5.11 yum repository

It is now EOD no updates available. but we require yum repo to install old applications .

go to and run

cd /etc/yum.repos.d
for i in $(ls *.repo); do mv $i $i.orig; done

copy the below code and save as  CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.11/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.11/updates/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://vault.centos.org/5.11/addons/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.11/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://vault.centos.org/5.11/centosplus/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://vault.centos.org/5.11/contrib/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Source link 

 

How to check Internet Speed on Centos CLI

How to check Internet Speed on Centos CLI

Speedtest-cli is Python script  its works on Python program.

you must have Python installed. check if have installed .

python –version
python3 –version
lsb_release -a

if you have not install then install it by

# yum install python

Download the script

#wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

#chmod +x speedtest-cli

Now check the internet speed

#./speedtest-cli

or

#python speedtest-cli

Source link 

Centos 6.x repository not working

Centos 6.4 repository not working

just rename     /etc/yum.repos.d/CentOS-Base.repo

cd  /etc/yum.repos.d/

mv  CentOS-Base.repo  CentOS-Base.repo.old

copy and paste below code on command prompt

they try to use yum .

cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[C6.4-base]
name=CentOS-6.4 - Base
baseurl=http://vault.centos.org/6.4/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.4-updates]
name=CentOS-6.4 - Updates
baseurl=http://vault.centos.org/6.4/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.4-extras]
name=CentOS-6.4 - Extras
baseurl=http://vault.centos.org/6.4/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.4-contrib]
name=CentOS-6.4 - Contrib
baseurl=http://vault.centos.org/6.4/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[C6.4-centosplus]
name=CentOS-6.4 - CentOSPlus
baseurl=http://vault.centos.org/6.4/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF

 

How to update Centos 5 .X and cannot find a valid baseurl for repo

How to update Centos 5 .X and cannot find a valid baseurl for repo

If you are using CentOS 5.x and want to install any software and update CentOS 5.x  . you are getting following error .

root@server1 [~]# yum update -y
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

This is because update repositories were moved to the CentOS vault when the operating reached it's end-of-life.

Edit the following file

Continue reading How to update Centos 5 .X and cannot find a valid baseurl for repo