An entity composed of reality and pseudo-reality. Enjoys coding, news, history, photography.
A bit of Ruby, a bit of JavaScript, a bit of love...
I needed to limit access to Redis running on port 6379 to localhost on a Linux server. Here is the code to run that. It basically disallows anyone one who is not 127.0.0.1 from access to the server.
sudo iptables -A INPUT -i eth0 ! -s 127.0.0.1 -p tcp --destination-port 6379 -j DROPThis could be generalized to other services i.e MySQL, PostgresSQL, etc. but here it is.
Comments 2 Comments