Redirect HTTP requests to HTTPS with Nginx


All login credentials transferred over plain HTTP can easily be sniffed by an MITM attacker, but is is not enough to encrypt the login forms. If you are visiting plain HTTP pages while logged in, your session can be hijacked, and not even two-factor authentication will protect you. To protect all info sent between your visitors – which includes you – and your web server, we will redirect all requests that are coming over plain HTTP to the HTTPS equivalent.

It is not really necessary to use HTTPS for absolutely all requests, but it makes your life much easier to just handle one scheme and redirect all plain HTTP traffic to the equivalent HTTPS resource. So please make sure you setup HTTPS for the same hostname that you use for plain HTTP. Do NOT use if your regular hostname is The only difference should be the scheme – nothing else. This will save you from a lot of headaches further down the road. Continue reading “Redirect HTTP requests to HTTPS with Nginx”

Network Types Geographically


Networks are frequently classified according to the geographical boundaries the network spans. Two basic geographical designations for networks—local area network (LAN) and wide area network (WAN)—are the most common. A third designation, metropolitan area network (MAN), is also used, although its use has become clouded (because it might not be a clear-cut classification anymore) as networks continue connecting to the Internet. These three classifications, unlike the other methods used to describe networks, are based upon the specific levels of technology they use when going from one level to the other. The three geographical classifications are discussed because the geographical concepts and the increased emphasis they place on technology as you go from one level to the next still apply.

Continue reading “Network Types Geographically”

Modeling the Network – Network Devices and their Interfaces


When we try to identify ourselves within the Network, we usually run a commands like ipconfig /all (on ms windows platforms). Apart from information related to the computer we work on, the command displays a list of IP related devices – in our example – a wireless adapter, a network card and an ADSL modem, devices which allow us to communicate to a network. Each of these devices exhibit a physical address – six bytes in hexadecimal representation and, for two of them, for which the connection is active, an IP address. These devices, which are, to some extent, part of our workstation, serves as a network interface. This clarifies a first issue, IP addresses are not for computers, as the general belief goes, but for interfaces, like network cards,wireless adapters, firewire ports. Also, interfaces serve as end points for communication links, which may be UTP cables, coaxial cables or radio waves. To make a distinction between a workstation (or another physical
network element) and its interfaces, a physical device consisting of a processing unit with one or more interfaces will be called a network device. Continue reading “Modeling the Network – Network Devices and their Interfaces”