Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running an haproxy server and was wondering what configuration exactly do I need in order to log out going connections (from my webserver to my client).

I'm currently logging incoming connections only (client to server).

Thanks in advance.

share|improve this question

You... don't. Outgoing connections don't go via haproxy. If you need to limit outgoing connections, use a perimeter firewall, and if you really, really need to log outgoing connections (why?), then either setup a full netflow logging system on your perimeter, or run everything through a proxy like squid (for HTTP(S)/FTP) or perhaps a socks proxy for other protocols.

share|improve this answer

HAProxy is designed for many-to-few operation, where the 'few' are the network services behind it and are statically defined in the config file. Reversing the flow, few-to-many, simply won't work with HAProxy.

For that use something that is designed for that sort of operation, such as a Squid proxy or any number of commercial "track your employees browsing habits" perimeter products. Alternately, you could improve your network logging instead and grab net-flow data which will get all transactions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.