All posts by Brian

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: