Why can't I unblock postgres with shorewall?
Posted
by ryeguy
on Server Fault
See other posts from Server Fault
or by ryeguy
Published on 2009-08-24T02:10:30Z
Indexed on
2010/03/17
15:21 UTC
Read the original article
Hit count: 476
I can't seem to unblock the port needed for postgres using Shorewall. I am developing a PHP app on my windows machine here, and then I upload it on my linux box to actually use it. The linux box runs the php files as well as hosts the db server. Since I need it working from both machines, in my PHP code I am referring to the database as the full IP instead of localhost.
I can easily connect to postgres from my windows machine, but ironically, my PHP app can't connect to postgres even though it's on the same box. Here's what I have in /etc/shorewall/rules:
#macro/action src dest
PostgreSQL/ACCEPT net $FW
PostgreSQL/ACCEPT loc $FW
PostgreSQL/ACCEPT loc dmz
PostgreSQL/ACCEPT net dmz
PostgreSQL/ACCEPT loc net
PostgreSQL/ACCEPT dmz $FW
PostgreSQL/ACCEPT dmz loc
PostgreSQL/ACCEPT dmz net
PostgreSQL/ACCEPT dmz dmz
Clearly I have a ton of crap there. The first line is all I needed to make it allow a connection from my windows machine. All the lines after it are me just trying everything to get it to work. What am I missing?
© Server Fault or respective owner