MySQL Forums
Forum List  »  Router & Proxy

Re: Access logging
Posted by: Jan Kneschke
Date: July 07, 2007 03:27PM

I added proper lua hooks for read_handshake() and now you can check the IP addresses and more and deny a client to connect to the server:

examples/tutorial-states.lua shows how it works.

Connection from 127.0.0.1 I get:

$ echo "SELECT 1" | mysql --host=127.0.0.1 --port=4040

--> a client really wants to talk to a server
<-- let's send him some information about us
mysqld-version: 50119
thread-id : 534
scramble-buf : "r./?.g>=Z+gHoy2+\"dSU\000"
server-addr : 127.0.0.1:3306
client-addr : 127.0.0.1:48700
--> there, look, the client is responding to the server auth packet
username : root
password : "1߰p+<��#+"
default_db :
--> someone sent us a query
query: select @@version_comment limit 1
--> someone sent us a query
query: SELECT 1
--> someone sent us a query

Connection from the external interface we get this instead:

$ echo "SELECT 1" | mysql --host=192.168.2.100 --port=4040
ERROR 1000 (00000): #00S00only local connects are allowed

The proxy says:

--> a client really wants to talk to a server
<-- let's send him some information about us
mysqld-version: 50119
thread-id : 533
scramble-buf : "tR{8A|n5YB~vS{2%cDie\000"
server-addr : 127.0.0.1:3306
client-addr : 192.168.2.100:7971
we don't like this client

Options: ReplyQuote


Subject
Views
Written By
Posted
7329
July 05, 2007 11:32AM
Re: Access logging
3107
July 07, 2007 03:27PM
3104
July 09, 2007 03:21AM
3230
July 09, 2007 04:03AM
2814
July 09, 2007 03:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.