I've got a mySQL machine I need to establish a remote connection to. The problem is that the outbound connection machine is on a network which blocks port 3306 outgoing, and the mySQL process is shared with other applications/developers.

My current thinking is to use iptables wizardry to get it to change ports as its listening on them. I've found

I've found iptables commands which work on a NAT-based level e.g.

iptables -A PREROUTING -t nat -p tcp --dport 8080 -j REDIRECT --to-port 3306

I'm having a hard time finding an appropriate iptables target which works on INPUT

link|improve this question
Why do you think you need to do this on the INPUT chain (filter table)? – Zoredache Aug 12 '09 at 0:51
feedback

1 Answer

up vote 0 down vote accepted

Ummm... You already have the answer there :-)

If thats not working, maybe you are blocking those ports on the INPUT chain. You need to add accept rules for those as well (both 8080 and 3306 I think). The PREROUTING chain is before the INPUT chain.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.