I have a database server (specifically Tokyo Tyrant) running on one machine and a web server running on a separate machine.
I need to setup iptables on both machines so that the web server can make queries on the database server. Currently, I get "connection refused" when I try this from the web server:
tcrmgr list ${ip_of_db_server}:${port}
Preferably, the db server should only accept traffic from the ip address of the web server.
I am new to iptables so this may be obvious, but I am struggling.
Any help much appreciated -thanks!
(Edit: NB. here's a list of my iptables rules:
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:www
DROP all -- anywhere anywhere
ACCEPT tcp -- anywhere 10.179.51.126 tcp dpt:1948
)