I am setting up Memcached on a Debian server that has two interfaces - eth0 (public) and eth1 (private).
I want Memcached to listen on both eth1 and lo (loopback) so that it can be accessed even if the private network goes down but NOT eth0 (public).
From the man page for memcached I understand that the -l
option can take only one IP address. I thought of using UNIX sockets for local connections but the man page says
-s
Unix socket path to listen on (disables network support).
The only other method I know is to block connections via eth0 using IPTables. Is there any other solution that does not make use of the firewall?