marcus0263 wrote:
I've got my mysql server on my private network and my db traffic going through the inside NIC.
Now with the recent change I try to open all traffic go the private IP and restrict my public to ssh, http, dns. Doesn't work, when ever I activate iptables now I loose connectivity to my db server on my private network
The following two additions
ought to permit such traffic:
Code:
iptables -I INPUT 1 -s db.server.private.ip -j ACCEPT
iptables -I OUTPUT 1 -d db.server.private.ip -j ACCEPT
Of course, your DB server must be set up to permit the incoming traffic! If this doesn't work, maybe there's some fancy footwork going on in the other tables besides the 'filter' table? Do this to see what they contain:
Code:
iptables -t nat -nv -L
iptables -t mangle -nv -L
iptables -t raw -nv -L
If all else fails, you could create an ssh forward from the web server to the other host
Code:
ssh -L localhost:3306:localhost:3306 db.server.private.ip
and point your DB-using applications at 'localhost' instead of the other server. The extra overhead might slow down queries, but I don't know by how much.