ADVERTISEMENT

Using Wireguard VPN

Published Apr 27, 2020 12:00 am
I have been keeping tabs of this new open source VPN protocol,Wireguard. It has been in constant development for quite sometime already, but I never really jumped into using it until it was added to the latestUbuntu Linuxdistribution, version 20.04 LTS. This means that Wireguard is now going mainstream. Wireguard, as described on its website, is extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster,simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more than OpenVPN. What makes Wireguard extremely attractive for me is the fact that it is built to be resilient with roaming clients, i.e., when clients changes IP addresses, such as when you are on your mobile phone or tablet and on mobile data. Currently, I have a Windscribe VPN account that I use regularly using IKEv2, which is faster compared to OpenVPN, at least for me. However, when I connect to my home network, I use OpenVPN since it is the only VPN supported by my current router (even theFirewallathat I have uses OpenVPN, though I wish that it’d move to Wireguard soon). PiVPN With Wireguard going mainstream, I figured that I can now install it on my Raspberry Pi, alongsidePi-hole. Setting up Wireguard is pretty easy — it is just a matter of doing some command-line kung-fu on your Raspberry Pi. Running “curl -Lhttps://install.pivpn.io| bash” will download and guide you step-by-step in configuring your VPN. You will be presented with two options — OpenVPN and Wireguard. Once you have the Wireguard server ready, just configure your client with the “pivpn -a” command, and then do “pivpn -qr” to display the QR code, which you can scan on your device to transfer the configuration. Pretty simple. Wireguard on the cloud In addition to Windscribe, I figured that having my own Wireguard server can complement my VPN connections. One of my favorite VPS providers, Linode, has a one-click install for Wireguard, but I figured that I’d try a new VPS provider, Vultr.com. Spinning up a new server with Ubuntu Linux 20.04 LTS and configuring Wireguard on it is not that complicated. You can readthis Linode documentto help you. In addition to doing exactly the same as the Raspberry Pi Wireguard server, I configured clients connecting to this server to useNextDNS.io. This is like your own Pi-Hole on the cloud — that way, I can block *any* URL that I want. Wireguard on iOS/iPadOS There is an official Wireguard iOS/iPadOS application on the iOS App Store (there is one on the Play Store as well). Configuring it to connect to my two Wireguard servers is as simple as scanning their respective client QR codes. So there you have it, setting up your own Wireguard VPN is not that complicated. You can never have enough VPN connections at your disposal. What are you waiting for? Deploy your own now. And oh, just in case you want to try Vultr.com, use my referral code,https://www.vultr.com/?ref=8551651-6G, so we can both get free credits whilst you setup and deploy your own server.
ADVERTISEMENT
.most-popular .layout-ratio{ padding-bottom: 79.13%; } @media (min-width: 768px) and (max-width: 1024px) { .widget-title { font-size: 15px !important; } }

{{ articles_filter_1561_widget.title }}

.most-popular .layout-ratio{ padding-bottom: 79.13%; } @media (min-width: 768px) and (max-width: 1024px) { .widget-title { font-size: 15px !important; } }

{{ articles_filter_1562_widget.title }}

.most-popular .layout-ratio{ padding-bottom: 79.13%; } @media (min-width: 768px) and (max-width: 1024px) { .widget-title { font-size: 15px !important; } }

{{ articles_filter_1563_widget.title }}

{{ articles_filter_1564_widget.title }}

.mb-article-details { position: relative; } .mb-article-details .article-body-preview, .mb-article-details .article-body-summary{ font-size: 17px; line-height: 30px; font-family: "Libre Caslon Text", serif; color: #000; } .mb-article-details .article-body-preview iframe , .mb-article-details .article-body-summary iframe{ width: 100%; margin: auto; } .read-more-background { background: linear-gradient(180deg, color(display-p3 1.000 1.000 1.000 / 0) 13.75%, color(display-p3 1.000 1.000 1.000 / 0.8) 30.79%, color(display-p3 1.000 1.000 1.000) 72.5%); position: absolute; height: 200px; width: 100%; bottom: 0; display: flex; justify-content: center; align-items: center; padding: 0; } .read-more-background a{ color: #000; } .read-more-btn { padding: 17px 45px; font-family: Inter; font-weight: 700; font-size: 18px; line-height: 16px; text-align: center; vertical-align: middle; border: 1px solid black; background-color: white; } .hidden { display: none; }
function initializeAllSwipers() { // Get all hidden inputs with cms_article_id document.querySelectorAll('[id^="cms_article_id_"]').forEach(function (input) { const cmsArticleId = input.value; const articleSelector = '#article-' + cmsArticleId + ' .body_images'; const swiperElement = document.querySelector(articleSelector); if (swiperElement && !swiperElement.classList.contains('swiper-initialized')) { new Swiper(articleSelector, { loop: true, pagination: false, navigation: { nextEl: '#article-' + cmsArticleId + ' .swiper-button-next', prevEl: '#article-' + cmsArticleId + ' .swiper-button-prev', }, }); } }); } setTimeout(initializeAllSwipers, 3000); const intersectionObserver = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { const newUrl = entry.target.getAttribute("data-url"); if (newUrl) { history.pushState(null, null, newUrl); let article = entry.target; // Extract metadata const author = article.querySelector('.author-section').textContent.replace('By', '').trim(); const section = article.querySelector('.section-info ').textContent.replace(' ', ' '); const title = article.querySelector('.article-title h1').textContent; // Parse URL for Chartbeat path format const parsedUrl = new URL(newUrl, window.location.origin); const cleanUrl = parsedUrl.host + parsedUrl.pathname; // Update Chartbeat configuration if (typeof window._sf_async_config !== 'undefined') { window._sf_async_config.path = cleanUrl; window._sf_async_config.sections = section; window._sf_async_config.authors = author; } // Track virtual page view with Chartbeat if (typeof pSUPERFLY !== 'undefined' && typeof pSUPERFLY.virtualPage === 'function') { try { pSUPERFLY.virtualPage({ path: cleanUrl, title: title, sections: section, authors: author }); } catch (error) { console.error('ping error', error); } } // Optional: Update document title if (title && title !== document.title) { document.title = title; } } } }); }, { threshold: 0.1 } ); function showArticleBody(button) { const article = button.closest("article"); const summary = article.querySelector(".article-body-summary"); const body = article.querySelector(".article-body-preview"); const readMoreSection = article.querySelector(".read-more-background"); // Hide summary and read-more section summary.style.display = "none"; readMoreSection.style.display = "none"; // Show the full article body body.classList.remove("hidden"); } document.addEventListener("DOMContentLoaded", () => { let loadCount = 0; // Track how many times articles are loaded const offset = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // Offset values const currentUrl = window.location.pathname.substring(1); let isLoading = false; // Prevent multiple calls if (!currentUrl) { console.log("Current URL is invalid."); return; } const sentinel = document.getElementById("load-more-sentinel"); if (!sentinel) { console.log("Sentinel element not found."); return; } function isSentinelVisible() { const rect = sentinel.getBoundingClientRect(); return ( rect.top < window.innerHeight && rect.bottom >= 0 ); } function onScroll() { if (isLoading) return; if (isSentinelVisible()) { if (loadCount >= offset.length) { console.log("Maximum load attempts reached."); window.removeEventListener("scroll", onScroll); return; } isLoading = true; const currentOffset = offset[loadCount]; window.loadMoreItems().then(() => { let article = document.querySelector('#widget_1690 > div:nth-last-of-type(2) article'); intersectionObserver.observe(article) loadCount++; }).catch(error => { console.error("Error loading more items:", error); }).finally(() => { isLoading = false; }); } } window.addEventListener("scroll", onScroll); });

Sign up by email to receive news.