The Best Multiplatform Development Environment that Ever Lived on One Box
Firewalling support for Linux has gone through many changes. Unlike other aspects of the kernel's evolution that have been methodical, each change to the firewalling modules has been radical compared to prior versions. The downside of this is each change to the way Linux deals with firewalling has a new learning curve associated. Like other areas of Linux development, however, each release has been very stable and has provided support for backward compatibility. Linux is evolving into a mature, enterprise-strength firewalling solution, as evidenced by companies like Watchguard.
In previous releases of the kernel, the firewall configuration tool was called ipchains. Now, with the 2.4 release, this has once again changed to a tool called iptables. Both of these tools run on the command line but hook into the kernel to configure firewall settings at a very low level. The iptables arrangement offers significant advantages over the ipchains way of kernel organization, but ipchains will be supported for some time as a kernel loadable module. For more information, see kernel.org and IPCHAINS-HOWTO.
For my purposes, ipchains offered more than adequate support for my needs. My major concerns regarding firewalling were:
Lock down all extraneous/unused ports and services to have a safe box. Since I would potentially be housing sensitive information while developing software for my clients, it was important that the box be adequately protected.
Provide NAT (network address translation) services to my internal network, often called IP masquerading. Since I only had one valid IP address and a number of workstations needing access to the Internet, I needed to provide a way for to manage multiple connections through my single (real) internet connection.
Provide port tunneling services, where appropriate, to other internal boxes. In some cases, I had other machines running internet protocols internally that I wanted to allow access to from the Internet.
The ASCII diagram below shows our network/firewall setup:
|------| ------- 192.168.1.0 | | | | W1 |----------------| | 11 | | |------| | | |---------| |------| | | | | | | eth0|200 D|eth1 Internet | W2 |----------------|--------------| Linux |--------------------- | 12 | | | | |------| | |---| | | | |---------| |------| | | | | | | | VM | | W3 |----------------| | 201 | | 13 | | | | |------| -------- |---------|
The internal network is 192.168.1.0. Each machine on the diagram above shows the last number in its IP address. The Linux box has two physical adapters. The internal one (eth0) has an address on the internal network (200), while the external adapter (eth1) obtains its address dynamically via DHCP. This is why it is marked with a D on the diagram.
It is ipchains that allows NAT between the internal network and the Internet. All outgoing connections are allowed. All incoming connections are disallowed, with the exception of port 80 (HTTP), port 22 (SSH) and port 8080 (for an HTTP server running on the VM machine). These services will be explained in more detail below.
Notice the VM machine is shown "behind" the Linux box. This will be explained in more detail in the VMware section below.
A simple program named redir, found at sammy.net, allows services running on an internal machine to be accessed from the outside (Internet) network. This program accepts connections on a certain port and proxies those connections to another port on a different machine.
First of all, external connections must be allowed to the port on the Linux box. In my case, this port is 8080. The redir command we execute looks like this:
redir --lport=8080 --caddr=192.168.1.101 --cport=8080 --syslog &
The lport is the listen port of the local machine. The caddr and cport settings are the connection address and port, respectively. The syslog parameter instructs redir to log all connections to the standard system log.
As a result of this command, any connections to the Linux box on port 8080 will be served by the web server running on the VM box (also from port 8080).
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Google's SwiftShader Released
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Interview with Patrick Volkerding
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Tech Tip: Really Simple HTTP Server with Python
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide