The closest i've gotten is squid. The problem is that when the traffic gets forwarded from the proxy the url and port is re-written. Since the proxy is the only thing i want open to the outside world the request fails because the url gets re-written to the local ip address of the sabnzbd server. (what ever is in the SABnzbd Host field in the configuration file)
Now here's an important note: When i place the sabnzbd server and the proxy on the same server and serve sabnzb up on 127.0.0.1 it works just fine.
The closest explanation of the problem i've seen is here: http://wiki.squid-cache.org/SquidFaq/ReverseProxy/
What that sounds like to me is i need to set sabnzbd's server name to that of my DNS name. Is that correct? How do i go about it?When using an httpd-accelerator, the port number or host name for redirects or CGI-generated content is wrong
This happens if the port or domain name of the accelerated content is different from what the client requested. When your httpd issues a redirect message (e.g. 302 Moved Temporarily) or generates absolute URLs, it only knows the port it's configured on and uses this to build the URL. Then, when the client requests the redirected URL, it bypasses the accelerator.
To fix this make sure that defaultsite is the site name requested by clients, and that the port number of http_port and the backent web server is the same. You may also need to configure the official site name on the web server.
Alternatively you can also use the location_rewrite helper interface to Squid to fixup redirects on the way out to the client, but this only works for the Location header, not URLs dynamically embedded in the returned content.
Here's the important part of my squid config.
http_port 3124 accel defaultsite=<me>.no-ip.org
#forwarded_for on
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl sabnzbd urlpath_regex ^/sab
acl sickbeard urlpath_regex ^/sick
acl our_sites dstdomain <me>.no-ip.org
cache_peer 127.0.0.1 parent 8080 0 no-query originserver name=router login=PASSTHRU
cache_peer_access router deny sabnzbd
cache_peer_access router allow sickbeard
cache_peer 10.0.1.5 parent 8080 0 no-query originserver no-digest no-tproxy name=server forceddomain=<me>.no-ip.org login=PASSTHRU
cache_peer_access server deny sickbeard
cache_peer_access server allow sabnzbd
#acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
http_access allow sabnzbd
http_access allow sickbeard
http_access allow our_sites
