LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-26-2003, 02:02 PM   #1
precioso77
LQ Newbie
 
Registered: Apr 2003
Distribution: redhat 9
Posts: 9

Rep: Reputation: 0
mysql through proxy server


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

Last edited by precioso77; 10-27-2003 at 06:31 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration