Friday, March 29, 2013

[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)

In this tutorial, I'm going to show you how to add a CentOS 6 server as a OpenVPN client to your existing Site to Site VPN.

This is an extension of my [Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN and assumes you already have your Site to Site VPN operational. However, you should be able to follow this tutorial and connect to any existing OpenVPN Server.

At the end of this tutorial, your CentOS server will be able to securely access your LAN resources (i.e, computers, printers) on both sites and vice versa (you will also be able to seamlessly access your CentOS server).

Overview of the Steps:

1) Generate Certs and Keys
2) Copy/Transfer over Certs and Keys to Client VPS
3) Install OpenVPN (client)
4) Configure OpenVPN Client
5) Connect


Generate cert/keys for VPS (CentOS 6 32-bit OpenVPN Client)

SSH into your TomatoUSB OpenVPN Server.

#Setup and initialize environment
cd /opt/openvpn-easy-rsa
source ./vars


#myvps_client is the Common Name
./build-key myvps_client


Copy/Transfer over Certs and Keys to Client VPS

Since my CentOS server is running SSH, I'm going to use SSH and SCP (secure copy) to transfer over the certificates and key. You can also transfer over the keys via SFTP or a USB drive.


#create the /etc/openvpn/keys folder on my centos server
ssh root@myvps.qnology.com mkdir -p /etc/openvpn/keys 

#copy over the certificates and keys
#all one line
cd /opt/openvpn-easy-rsa
scp keys/ca.crt keys/myvps_client.crt keys/myvps_client.key root@myvps.qnology.com:/etc/openvpn/keys

Install OpenVPN on CentOS 6

#Bring everything up to date
yum -y update

#Add EPEL (Extra Packages for Enterprise Linux) Repo
# RHEL/CentOS 6 32-Bit ##
cd /tmp 


wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm

yum --enablerepo=epel install openvpn.i686

Configure OpenVPN Client

#copy sample client.conf to /etc/openvpn
cp /usr/share/doc/openvpn-2.2.2/sample-config-files/client.conf /etc/openvpn


#edit openvpn client.conf
nano /etc/openvpn/client.conf

Update the following lines
#remote OpenVPNServer.ADynamicDNSAddress.com 1194
#ca /etc/openvpn/keys/ca.crt
#cert /etc/openvpn/keys/myvps_client.crt
#key /etc/openvpn/keys/myvps_client.key

#start VPN manually to test
openvpn --config /etc/openvpn/client.conf


#test starting VPN as a service
service openvpn start

#autostart at OpenvPN client on reboot
chkconfig openvpn on



87 comments :

  1. Hi Qui,
    Thanks for all the hard work you have done on making this happen. Worked really well for me until I had daft idea of Cups printing. Killed setup so did a reinstall. all working except getting error on svn checkout https://github.com/archlinuxarm/PKGBUILDs/trunk/aur/plexmediaserver as file not found. what should I do now?

    ReplyDelete
    Replies
    1. You posted this comment on the wrong blog. :)

      Thanks for letting me know. Link has been updated. Build in progress and will update pre-compiled package this weekend.

      Delete
  2. Well ! I use the above steps to add cent os server to vpn . After setting a vpn , i use Ip-details.com to check whether ip gets changed or not .

    ReplyDelete
  3. You have a real ability for writing unique content. I like how you think and the way you represent your views.Thanks.

    ReplyDelete
  4. I like such tutorials cause they are short and precise. It is talent to write the most important things in the article. I know it cause notext I am a writer.

    ReplyDelete
  5. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. web

    ReplyDelete
  6. With all that software I still can't get myself VPN so probably this solution will work. I rarely rely on any sites or services besides HitTheGrade but your blog is really cool so I wanna give it a try. Thank you for posting!

    ReplyDelete
  7. iTunes is an Apple particular software program, iTunes Account Though iTunes login accounts are mainly made use of on Apple tools.

    ReplyDelete
  8. So you've selected to dive your self into the universe of sport advancement, have accumulated a group of forceful warriors to handle all the tremendous problems and are prepared to make the subsequent high-quality game inside the commercial enterprise. Gmod game

    ReplyDelete
  9. Creating a blog can appear difficult for many people, even though for some individuals it's an simple process. Nevertheless, a very important factor that everybody shares in common is that they are searching for ways to improve their blog and attain incre.cheap shoes in Pakistan

    ReplyDelete
  10. Uptime is one of the most important factors in maintaining an effective online presence. Outages of any duration can be costly. Downtime can impact your organization directly by causing lost sales, signups, etc., or indirectly by hurting your reputation and brand image.mens casual dress shoes

    ReplyDelete
  11. Loved to read your blog. I speedypaper review would like to suggest you that traffic show most people read blogs on Mondays. So it should encourage blogger to write new write ups over the weekend primarily.

    ReplyDelete
  12. You have shared a nice article here about the CentOS 6 OpenVPN Client. Your article is very informative and I liked your way to share this article here. If anyone looking for the static ip vpn service, Visit vpnshazam.com

    ReplyDelete
  13. office.com/setup microsoft office setup is the item setup record with this setup report you can present on your pc and a part of the reinforced contraption to use microsoft office. The microsoft office programming just as all the item constantly has the setup record, and it is basic, without the setup report the item turn futile
    office.com/setup

    ReplyDelete
  14. office.com/setup get present and dynamic. microsoft office setup is the full suite of microsoft limit programming that joins a blend of businesses, affiliations, and server like surpass desires, powerpoint, word, onenote, distributer and access.
    office.com/setup

    ReplyDelete
  15. norton.com/setup norton antivirus actuation and setup of specialized help administrations norton antivirus is intended to identify and wipe out the conceivable dangers for a framework like worms,trojan and different infections and can play out various application examine.
    office.com/setup
    norton.com/setup
    mcafee.com/activate
    mcafee.com/activate

    ReplyDelete
  16. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative.
    mcafee.com/activate|mcafee.com/activate|mcafee.com/activate|mcafee.com/activate|norton.com/setup|office.com/setup

    ReplyDelete
  17. Thanks for taking the time to share this informative article here. Reading your article I got numerous valuable information about the VPN. Get a solution for your all MS office problems from officecomsetup-key.com. To know more about us from install office setup

    ReplyDelete
  18. Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. 5g Technology

    ReplyDelete
  19. Great job, I read a lot of blog post and I never heard of a topic like this. This is probably the best, most concise step -by-setup guide I have ever seen.

    office.com/setup ! mcafee.com/activate ! mcafee.com/activate


    ReplyDelete
  20. awesome survey, i am positive you'now not inside the make remote off from getting a acquiescent reputation. Guest Post

    ReplyDelete
  21. Very nice, it’s really amazing and informative also. Visit OGEN Infosystem for Best Website Designing Company and get creative and responsive website designing.
    Best Website Designing Company in Delhi

    ReplyDelete
  22. According to me this is the best blog tutorial on the google.Thanks for sharing such a knowledgeable post with us. I am looking forward for the more blog about vpn on your blogspot.
    Rank your website at first page with us on Google a Within a 1 month at cheap price. 99 Digital Services is the best SEO Agency in Delhi
    .

    ReplyDelete
  23. Your Digital Boat is the best digital marketing agency in delhi. It provides you many services like seo, smm, smo, sem, website development, graphic designing and many more visit http://yourdigitalboat.com to get your free demo.

    ReplyDelete
  24. Learn how to use safe and natural ingredients to naturally repel ants and get rid of unwanted ants in the house. These 5 proven home remedies for ants will get rid of these tiny pests without a call to the exterminator.

    ReplyDelete
  25. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative.

    office.com/setup
    mcafee.com/activate
    norton.com/setup
    office.com/setup

    ReplyDelete
  26. I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information.

    norton.com/setup
    norton.com/setup
    norton.com/setup

    ReplyDelete
  27. I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information.

    mcafee.com/activate
    mcafee.com/activate
    mcafee.com/activate
    office.com/setup
    mcafee.com/activate

    ReplyDelete
  28. Is it okay to post part of this on my website basically post a hyperlink to this webpage? Expert Witness

    ReplyDelete
  29. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative
    mcafee.com/activate
    office.com/setup
    mcafee.com/activate
    mcafee.com/activate

    ReplyDelete
  30. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative
    norton.com/setup
    norton.com/setup
    norton.com/setup
    mcafee.com/activate
    office.com/setup
    webroot.com/safe

    ReplyDelete
  31. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. norton.com/setup
    office.com/setup
    office.com/setup
    mcafee.com/activate

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.
    I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Kinemaster Diamond APK And GB Instagram APK 

    ReplyDelete
  34. How to Activate Webroot? 2020

    With webroot com safe, you are furnished with world-class web security for the total of your devices and for such an extremely close and expert use. It is possible to confront a couple of issues while presenting www webroot com safe on your Device.
    visit:
    www.webroot.com/safe

    ReplyDelete
  35. Thanks for sharing, I just like the valuable info you provide for your articles. I'll bookmark your weblog and take a

    look at once more right here regularly.

    Raksha bandhan quotes

    New comedy movies

    free amazon prime account

    Moviesda

    movierulz plz

    jio rockers

    ReplyDelete
  36. In the above tutorial I got to know how to add CentOS 6 server as a OpenVPN client, and I am very pleased with that. Many people, including me, had problems with this, but not now. Essay Writing Services

    ReplyDelete
  37. Treat Assignment Help is one of the most trusted names in UK offering Marketing Dissertation Help services. Contact us getting your desired career then get online marketing dissertation writing help.For more services : English Essay Help | Dissertation Help

    ReplyDelete

  38. Norton is an antivirus that can prevent attacks online, such as malicious ransomware, dangerous updates and hazardous websites. Across today’s environment, millions of people access the internet every day.

    www.norton.com/enroll

    ReplyDelete

  39. Norton Antivirus software is called Computer Security Guard which protects your system from the eyes of hackers and protects against harmful elements such as viruses, Trojans, threats, malware.

    norton.com/setup

    ReplyDelete
  40. Norton is the best option available in the market. Norton Antivirus is an effective anti-malware scanning engine that is reliable. Because millions of people are browsing the web every day.

    norton.com/enroll

    [url=https://en-enroll.com/]norton.com/enroll [/url]

    ReplyDelete
  41. This information is very useful for new website owners and through this, they can get knowledge about VPN. Some experts think that VPN are not useful for our websites, and we should avoid from VPN. What is your opinion about it? Dissertation writing service.

    ReplyDelete
  42. From abcassignmenthelp.com, you can take a wide range of assignment and essay help with no hesitation. We additionally give the alternative to essay customization. In the event that you have some extraordinary determination, let us know and we will give you the best essays following your requests. Along these lines, in the event that you are figuring, who can do my essay online abcassignmenthelp.com ought to be your decision. assignment help uae
    essay writing help

    ReplyDelete
  43. Hi, I am Sofia Moore , and it is a splendid article. The choice of words is spot on, and I didn't
    find any issues with the sentence fragment. I suppose the author has also spent a lot of time researching
    each point. All in all, it is a flawless work and has shown a lot of promise to anticipate more for the
    future. I am a writer myself, and I have had over a decade of experience in the IT sector. I like to inform
    people about general topics, but I specialize in the tech-domain. If you want to read articles like this one
    in your leisure time or on the weekends, you can visit my site:
    Roku.com/link
    TV.Youtube.com/activate
    YouTube.com/activate

    ReplyDelete
  44. Hello, Carter here I speak some feedback for your Blogs, That’s good hope you have more updations and share them with us so beneficial for everyone
    you can go and also visit or read my website.

    mcafee.com/activate
    www.mcafee.com/activate
    mcafee.com/activate

    ReplyDelete
  45. Boden, is this your blog is very nice and thankful for given info so for any required releted to internet security go and read this go and read this.
    Avast Download

    ReplyDelete
  46. Greetings for the day! I was looking up this information, and unfortunately not much was there on the sites which I found out. Of course, up until I stumbled upon this. I have bookmarked this site because I have found out it has amazing pieces of content. This is also a splendid writing piece. Now, if you have time, I would appreciate it if you read my work as well. I have been a digital writer for the last couple of years. Please visit this website:

    tv.youtube.com/start
    tv.youtube.com/start
    Amazon.com/mytv

    ReplyDelete
  47. Printers are useful machines that most people enjoy having whether at home or the office. It can be quite convenient to be able to print out a document, photo or webpage, even in today's digital era when so much can be achieved online. Considering that there is such a wide selection in terms of brands and models, the question is: which should you buy? Your choice will depend on many factors, and you can use the following suggestions to help you find the printer most suitable for you. best buy printers canon

    ReplyDelete
  48. Greetings! hey dear it's an amazing post really when i read this i think it's good info for everyone thanks for sharing. here is my blog and read this. I hope you like that and you have any required go and connect with me.
    Netgear Extender Setup
    Bitdefender Login

    ReplyDelete
  49. With all that software I still can't get myself VPN so probably this solution will work. I rarely rely on any sites or services besides HitTheGrade but your blog is really cool so I wanna give it a try. Thank you for posting! black and yellow punjabi suit , black shalwar kameez for girl ,

    ReplyDelete
  50. Thanks for a marvelous posting! I actually enjoyed reading it, you might be
    a great author.I will be sure to bookmark your blog and will
    often come back at some point. I want to encourage yourself to continue your great posts,
    have a nice day!

    my web page; 대구오피

    (freaky)

    ReplyDelete
  51. Hello, I think that I saw you visited my weblog so I came to “return the favor". I'm attempting to find things to enhance my website! I suppose its ok to use a few of your ideas!!
    국산야동
    Feel free to visit my blog : 국산야동

    ReplyDelete
  52. Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. check this link

    ReplyDelete
  53. Our close protection in London is about providing practical solutions based on accurate measurements with our eyes keen on prevention.residential security We study journeys and destinations; we carry out cartographic analysis and site inspections. And we also interview the local staff to find out about anything else that might be necessary or useful in helping us in executing our operations.

    ReplyDelete
  54. Thanks for the detailed article on this topic. I would like to see more such awesome articles from you.Download GBWhatsApp APK

    ReplyDelete
  55. Thank you for sharing this useful information, keep up the good work!

    ReplyDelete
  56. I was quite impressed with this valuable content this was purely interesting.


    바카라사이트
    카지노

    ReplyDelete
  57. You are so cool! I don't suppose I've read something like that before.
    So nice to find someone with a few original thoughts on this subject matter.


    토토사이트
    먹튀검증

    ReplyDelete
  58. I’m not sure where you are getting your info, however great topic일본경마

    ReplyDelete
  59. The site is based on the computer operating system where you can find an online manual and guide. ij.start.canon |
    ij.start.cannon

    ReplyDelete
  60. Nice response in return of this question with real arguments and explaining the whole thing about that.
    안전놀이터

    ReplyDelete
  61. I see some amazingly important and kept up to length of your strength searching for in your on the site
    data science course

    ReplyDelete
  62. Very informative post it is. I got my issue solved with this blog's help. I was having trouble connecting to vpn in centos 6 before. fmwhatsapp

    ReplyDelete
  63. I curious more interest in some of them hope you will give more information on this topics in your next articles.
    full stack development course

    ReplyDelete
  64. 바카라사이트
    Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging

    ReplyDelete
  65. disneyplus.com/begin is an online streaming platform, comparable as Hulu, Netflix, and Amazon Prime Video. The most appealing aspect of the platform is the fact that it's able to be used on many different devices, including tablets or smart TVs as as with PCs, iOS, and Android.

    ReplyDelete
  66. To sign up or log into Tubi on your Android TV,Tubi.tv/activate please follow the steps below:Open the Tubi app from your Android Home Screen.Press the left directional key on your Android TV remote to bring up the left navigation column, then select Sign In at the top of the column:You will now see an activation code appear on your screen. Follow the instructions you see there. Open a web browser on a second device and go to tubi.tv/activate. Please leave the activation code visible on your Android TV throughout the processIf you already have a Tubi account, click Sign In and proceed to either enter your email/password or login with Facebook/Google/Apple ID.If you don't have an account, you can click Register and create that account now.You will now be redirected to the activate a device page (if you're not redirected, go to tubi.tv/activate. Enter the activation code you see on your TV screen and click Activate Device. Your Android TV screen will automatically update, It may take several seconds on a slower connection, so please be patient! Once your TV screen refreshes, you will be logged into your Tubi account. You now have access to your List and Continue Watching features.If you already have a Tubi account, click Sign In and proceed to either enter your email/password or login with Facebook/Google/Apple ID. If you don't have an account, you can click Register and create that account now.You will now be redirected to the activate a device page (if you're not redirected, go to tubi.tv/activate. Enter the activation code you see on your TV screen and click Activate Device. Your Android TV screen will automatically update, It may take several seconds on a slower connection, so please be patient! Once your TV screen refreshes, you will be logged into your Tubi account. You now have access to your List and Continue Watching features.You will now be redirected to the activate a device page (if you're not redirected, go to tubi.tv/activate. Enter the activation code you see on your TV screen and click Activate Device. Your Android TV screen will automatically update, It may take several seconds on a slower connection, so please be patient! Once your TV screen refreshes, you will be logged into your Tubi account. You now have access to your List and Continue Watching features.

    ReplyDelete

  67. When creating a profile, after entering the activation code,Foxnews.com/connect the Create Your Account screen will be displayed.When signing in to your profile, after entering the activation code, the Sign Into Your Account screen will be displayed.Note: The activation site also knows if you are currently signed in with the TV provider for seamless entertainment. If you haven’t already logged in with the TV provider, you will be able to do so right from the activation screen.The channel was created by Australian-American media mogul Rupert Murdoch to appeal to a conservative audience, hiring former Republican media consultant and CNBC executive Roger Ailes as its founding CEO.[7][8] It launched on October 7, 1996, to 17 million cable subscribers.[9] Fox News grew during the late 1990s and 2000s to become the dominant subscription news network in the U.S.[10] As of September 2018, approximately 87,118,000 U.S. households (90.8% of television subscribers) received Fox News.[11] In 2019, Fox News was the top-rated cable network, averaging 2.5 million viewers.[12][13][14] Murdoch is the current executive chairman and Suzanne Scott is the CEO.The Fox News Channel, abbreviated FNC, commonly known as Fox News, and stylized in all caps, is an American multinational conservative[3] cable news television channel based in New York City. It is owned by Fox News Media, which itself is owned by the Fox Corporation.[4] The channel broadcasts primarily from studios at 1211 Avenue of the Americas in Midtown Manhattan. Fox News provides service to 86 countries and overseas territories worldwide,[5] with international broadcasts featuring Fox Extra segments during ad breaks.Below the video player it will say, "On Air Now". Click on the network you would like to watch (Fox News or Fox Business).Select your cable or satellite company from the list of participating TV service providers (note: this is not necessarily your Internet service provider). Under the main list of providers there is a drop down with more options. Enter your email address (or username) and password. This is typically the same account information you use to pay your TV service provider bill online.If you log in successfully, you will be returned to the video player and your selected network will begin playing live.

    ReplyDelete
  68. It is perfect chance to make a couple of game plans for the future and the opportunity has arrived to be sprightly. I've scrutinized this post and if I may I have the option to need to suggest you some interesting things or recommendations. Perhaps you could create next articles insinuating this article. I have to examine more things about it!

    ReplyDelete
  69. Nice post. Thanku so much to share this with us.

    [url=https://www.putlockerss.org/]putlocker[/url]
    [url=https://www.kissanimesru.com/]kissanime[/url]

    ReplyDelete
  70. The style of this site is great the aspect is truly incredible

    토토
    사설토토
    프로토

    ReplyDelete
  71. This didn’t just inspire this also teaches me a lot good ideas.

    토토사이트
    메이저사이트
    배트맨토토프로

    ReplyDelete
  72. Homescapes MOD APK is a very interesting fun-adventure game that is based on an incredible storyline. In this game, you will be playing as Austin the butler who is trying to set up his family mansion and bring all the comfort back to his home.

    ReplyDelete
  73. fm whatsapp is the favorite messaging app in india. all details about this version are updated free of charge on https://fmwaapps.com. you can see more there

    ReplyDelete
  74. Playrep is a online gaming platform where you can play online game like fun ab, roulette, teen patti poker, ander bahar and many more casino games for fun.

    ReplyDelete
  75. I’m pleased to uncover this website. I wanted to thank you for your time just for this wonderful read! I definitely really liked every little bit of it. Thanks so much for sharing. what is unimed cut off mark

    ReplyDelete
  76. Greetings! I wanted to take a moment to express my sincere appreciation for the time I spent reading your post. I found the informative content to be incredibly engaging and I am grateful for the effort you put into writing it.Fm Whatsapp

    ReplyDelete
  77. Choosing a Free Fire nickname is a fun and creative process. Try to pick something unique that reflects your personality or interests. Whether it's a cool alias, a reference to your favorite character, or a combination of words that resonate with you, make it your own. Just remember to keep it respectful and avoid offensive or inappropriate names.

    ReplyDelete
  78. Yes, nordvpn mod apk supports openvpn and you can easily download it from https://candinata.com/

    ReplyDelete