Latest articles
Showing 1-7 of 7Setup 802.1X Authentication on Arch Linux
Over the past few days, I attempted to set up 802.1X authentication on Arch Linux, a wired identity authentication protocol widely used in enterprise environments and well-supported on Windows and Ubuntu. However, when it came to Arch Linux, a series of strange issues emerged. To make matters more interesting, the machine in question has two onboard NICs, a Realtek r8169 and an Intel e1000e, and each ended up causing a different kind of trouble: the former during authentication, the latter during DHCP. This post will detail the problems I encountered and the debugging process.
Accelerate WordPress with CDN and Cache Servers
It has been a long time since I last wrote a blog post. In the past few days, I updated the architecture of Infinite Script to accelerate the speed for Chinese users. In this article, I share the new architecture of our website with you, illustrated in the figure above. Optimizing a CDN for Static Content Delivery Static content does not change over a period of time. If it does change, the changes are predictable. Static content includes images, CSS sheets, JavaScripts, and PDF files. Because of this, CDNs can cache a copy of the content at their edge servers. They can then serve it whenever a client requests it. CDNs are best at optimizing the delivery of static content from edge servers to users. Therefore, we use the CDN from Alibaba Cloud.
Internet Protocol v6
Internet Protocol version 6 (IPv6) is the current version of the Internet Protocol (IP). The IETF developed it to solve IPv4 address exhaustion, which has since become reality: IANA handed out its last IPv4 blocks in 2011, and the regional registries followed soon after. IPv6 is no longer a future technology but a deployed one, carrying more than 40% of the traffic reaching Google by the mid-2020s. IPv6 uses a 128-bit address, in theory allowing 2128 (about 3.4×1038) addresses, although a number of ranges are reserved or excluded from ordinary use. That is vastly more than the roughly 4.3 billion addresses of 32-bit IPv4. The two protocols are not interoperable on the wire, so hosts generally run both at once (dual stack) during the long transition.
Setup IPv6 NAT on OpenWrt Router
Introduction This tutorial is a HowTo for setting up IPv6 NAT (NAT66) on an OpenWrt router. Why would anyone want NAT on IPv6, when the whole point of the protocol was to give every device a globally routable address? In my case the campus network (China Education and Research Network, CERNET) authenticates per device and only assigns an IPv6 address to a device that has logged in. Every other device behind the router is left without connectivity. NAT66 works around this: the router authenticates once, then masquerades all LAN traffic behind that single authenticated IPv6 address, so every device on the network reaches the IPv6 Internet through it.
April Fools Pranks with a Squid Proxy Server
Introduction Note: This guide was tested using Ubuntu Server 14.04.4 LTS. This is a HowTo for setting up Upside-Down-Ternet on Ubuntu. Basically, when a user browses the web, all the images are flipped upside-down. While it’s not useful, it’s quite a good April Fool’s prank. The process uses a transparent proxy, web server, and script to flip the images. Web traffic is routed to the proxy, instead of the default gateway, which is intercepted by the proxy which then downloads and modifies the images and then serves them back to the client browser.
Consistent Hash Ring
Consistent hashing is a special kind of hashing such that when a hash table is resized and consistent hashing is used, only K/n keys need to be remapped on average, where K is the number of keys, and n is the number of slots. In contrast, in most traditional hash tables, a change in the number of array slots causes nearly all keys to be remapped. Consistent hashing achieves the same goals as Rendezvous hashing (also called HRW Hashing). The two techniques use different algorithms and were devised independently and contemporaneously.
HTTP Protocol
What’s HTTP? HTTP stands for Hypertext Transfer Protocol. It’s the network protocol used to deliver virtually all files and other data (collectively called resources) on the World Wide Web, whether they’re HTML files, image files, query results, or anything else. HTTP allows communication between a wide variety of hosts and clients, and supports a mixture of network configurations. To make this possible, it assumes very little about a particular system and keeps no state between message exchanges; this is why HTTP is called a stateless protocol. Communication usually takes place over TCP/IP sockets, though any reliable transport can be used. The standard (and default) port is 80, but a server can listen on any port.