Category Archives: linux

Simple, Easy NAT / PORT FORWARDING for IPTABLES (Ubuntu)

These instructions assume:

  • This is a dedicated firewall performing no other activities other than blocking and routing.
  • You have 2 network cards enabled and properly configured — one facing the public Internet, the other facing a private LAN using a non-routable IP range.
  • eth0 = public internet
  • eth1 = private LAN
  • your existing IPTABLES rules are ordered correctly (i.e. Make sure you don’t have a default DROP rule above any of these that you’re going to create below).

Continue reading Simple, Easy NAT / PORT FORWARDING for IPTABLES (Ubuntu)

Nginx & Ubuntu: Connection refused while connecting to upstream

Just in case you run into this.

Installed Nginx on mostly vanilla 14.04 trusty Ubuntu. Just walking through the simple Nginx (1.6.0) setup docs with a tail -f running on logs I was seeing the below inconsistent error while using the proxy_pass setting in my server directive.

==> /var/log/nginx/error.log <==
2014/05/11 14:31:50 [error] 4003#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: , server: , request: “GET / HTTP/1.1”, upstream: “http://[::1]:8080/”, host: “”

When I finally realized I was seeing an issue with IPv6, which I don’t use, I disabled it and the error went away.

Disable IPv6 on Ubuntu:

Python and Microsoft-free web application development and infrastructure

I’m the sort of technology professional who adapts easily to challenges, needs little direction, and can learn just about anything new if given a necessity and the time to learn something. Having long fostered an interest in open-source programming and big-iron tiered Internet delivery infrastructures, this seemed like just as appropriate a time to re-validate my big claim as any.

I’ve had an interest in the Python programming language for a while. In fact, it’s hard to find a Python programmer of any skill who can talk about this language and related stacks without the conversation turning to rainbows, unicorns, and butterflies. It powers some of the largest and heaviest web properties in the world and has a giant programmer base. It’s a high-powered OO language that reads more like spoken English than tech-ease. Great! Let’s dive in.

I didn’t want to empty my entire bag of tricks in favor of brand new tools and methodologies so I decided, at the very least, to use an Ubuntu linux base running the latest version of Apache as the web server. I know Ubuntu well enough to be considered “intermediate” and while I don’t have any active sites running under Apache, I’ve supported it in various environments long enough to get my hands dirty. This, I thought, would at least give me a solid foundation of existing knowledge from which I could present my new-found Python prowess. Turns out, I was only half right.

Continue reading Python and Microsoft-free web application development and infrastructure