MrPickle
asked on
SuSE Firewall - FW_REDIRECT
NOTE: This may seem like a DB question at first but eventually boils down to a networking question.
I am running a MySQL server on a SuSE 10.1 server. I would like to be able to connect to the same server instance using 2 different ports: 3306 (standard) and 3307. I added an entry into FW_REDIRECT as follows: 0/0,192.168.168.XXX,tcp,33 07,3306 This works and allows me to connect to the MySQL server using port 3307 from all computers in my network EXCEPT for the computer running the MySQL server, 192.168.168.XXX. I need this rule or this rule and others to work for 192.168.168.XXX also.
Thanks in advance for any help.
Phil
I am running a MySQL server on a SuSE 10.1 server. I would like to be able to connect to the same server instance using 2 different ports: 3306 (standard) and 3307. I added an entry into FW_REDIRECT as follows: 0/0,192.168.168.XXX,tcp,33
Thanks in advance for any help.
Phil
ASKER
Am I correct in assuming that the SuSE firewall is just a front end GUI for iptables firewall and that there is a configuration file somewhere that I can add the two rules you provided?
Also one more question. I noticed "nat" was in both commands you provided. This computer is not acting as a router or providing nat for the network, I have a hardware appliance I use for those tasks . Do the rules you provided still apply?
Also one more question. I noticed "nat" was in both commands you provided. This computer is not acting as a router or providing nat for the network, I have a hardware appliance I use for those tasks . Do the rules you provided still apply?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
iptables -t nat -A PREROUTING --destination 192.168.168.XXX --protocol tcp --destination port 3307 -j REDIRECT --to-ports 3306
# for locally generated packets
iptables -t nat -A OUTPUT --destination 192.168.168.XXX --protocol tcp --destination port 3307 -j REDIRECT --to-ports 3306