hello everyone
- i have http running on local server connecting thru ppp0 to internet (RH9)
- my ISP forces me to connect thru a proxy sever on port 8080
- I want to connect to a remote mysql server transparently in php running on local server
from what i gathered reading previous posts i should do the following:
1) use iptables to redirect all remote requests for port 3306 (mysql default) to another port say 3307
iptables -t nat -A PREROUTING -p tcp -d remote_address --dport 3306 -j REDIRECT --to-port 3307
or is it
iptables -t nat -I PREROUTING -p tcp --dst remote_address --dport 3306 -j REDIRECT --to 3307
iptables -t nat -I OUTPUT -p tcp --dst remote_address --dport 3306 -j REDIRECT --to 3307
is that it or is there more to it ?
2) use any proxy program (that will listen to port 3307 and forward it thru the ISP proxy_server:8080)
ive tried
http://sourceforge.net/projects/proxy/
p.s. ive tested this on the browser and it works fine by setting the browser to use the local_host:3307 as a proxy address
pls tell me if this is correct. the first step doesnt seem to be sufficient. to redirect requests on port 3306
am i missing any extra iptables commands ?
do i start iptables by /etc/rc.d/init.d/iptables start ?
cheers