| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
			
			 
				
				MySQL: How to Block specific hosts
			 
			Hi all, 
		
	
		
		
		
		
			I was wondering if there was any way to block specific IPs from connecting to MySQL? For example, I want all machines on an internal network to be allowed to connect except for one. I currently use 192.168.1.% in mysql.user table so that all hosts are allowed. Is there a way to leave that and disallow just one host? Or must I remove that line and enter every single IP on my network one by one (except ofcourse the one I don't want to connect) ?? Thanks 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Registered User 
			
		
			
			
			Industry Role:  
				Join Date: Mar 2002 
				Location: San Diego, CA 
				
				
					Posts: 935
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Ugh - I don't trust mysqld security. 
		
	
		
		
		
		
		
	
	You could use TCP wrappers to restrict access, but even better - use iptables/ipchains to block at the packet level.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2005 
				Location: At My Desk 
				
				
					Posts: 2,904
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 mysql is not a firewall, you do not issue block statements... 
		
	
		
		
		
		
		
	
	If you want you can fill me in on what your database does, i think you just have no understanding on administration of mysql, you only have to add the ip's to each database, with its own set of special commands it can run, and not mysql in general anyhow, if you are not doing that, then you are doing it all wrong.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
			
			Join Date: Jan 2005 
				
				
				
					Posts: 2,961
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Also, make sure you're on a switched network, or all this filtering is moot. 
				__________________ 
		
		
		
		
	
	![]() ZangoCash - Turn Your Traffic Into Ca$h. $.40 Per Install - No Tier  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Instead of granting each host I want to have access, it was a LOT easier to just keep my wildcard host (192.168.1.%) and then add a row containing the IP I wanted to block, with the same username as the record above, a different password and no privileges. Thus, anyone trying to connect from that IP with the same username all other servers use, will: 1) Have to find out the password somehow 2) If they do get the password, they will have no privileges on any database tables. 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 I just wanted to block one of demo servers that our team uses from accessing the real DB, incase they are testing something and have the wrong host specified 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jan 2003 
				Location: San Jose 
				
				
					Posts: 548
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 unfortunately i don't think you can, if you granted access to a block of ips i think that is it with mysql.  Only thing could think of is to run a sql script that would grant access to each ip, excluding the demo server or server ips that you don't want 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
			
			Join Date: Jan 2005 
				
				
				
					Posts: 2,961
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 
				__________________ 
		
		
		
		
	
	![]() ZangoCash - Turn Your Traffic Into Ca$h. $.40 Per Install - No Tier  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2005 
				Location: At My Desk 
				
				
					Posts: 2,904
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 please note that using .% is not a secure method, since i know now you use 192.blah.% let me show you why this is worthless.. 
		
	
		
		
		
		
		
	
	I just added 192.168.1.mysqlhacker.com to my dns I can now connect to your mysql This is mysql security 101, you really need to read the manuals  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 First African GFY Member 
			
		
			
			
			Join Date: Mar 2004 
				Location: New Jersey 
				
				
					Posts: 12,114
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2005 
				Location: At My Desk 
				
				
					Posts: 2,904
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 heh, probably not too hard for me, but i have no use for another mans porn  
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 So Fucking Banned 
			
		
			
			
			Join Date: Jan 2005 
				Location: At My Desk 
				
				
					Posts: 2,904
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 nice attack from 207.173.177.210 
		
	
		
		
		
		
		
	
	OrgName: Electric Lightwave Inc OrgID: ELIX Address: 4400 NE 77th Ave City: Vancouver StateProv: WA PostalCode: 98662 Country: US are you done giggling now, because i don't fuck around and trust me my skills are far superior than yours  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#14 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Registered User 
			
		
			
			
			Industry Role:  
				Join Date: Mar 2002 
				Location: San Diego, CA 
				
				
					Posts: 935
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#16 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jan 2003 
				Location: San Jose 
				
				
					Posts: 548
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 LOL, he didn't ask about security or anything, just how to do or if you can do something in mysql, but every felt the need to flex. LOL I love it. 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#17 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
			
			Join Date: Jan 2005 
				
				
				
					Posts: 2,961
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 ![]() 
				__________________ 
		
		
		
		
	
	![]() ZangoCash - Turn Your Traffic Into Ca$h. $.40 Per Install - No Tier  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#18 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
			
			Join Date: Jan 2005 
				
				
				
					Posts: 2,961
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 
				__________________ 
		
		
		
		
	
	![]() ZangoCash - Turn Your Traffic Into Ca$h. $.40 Per Install - No Tier  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#19 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Not everything I ask is because I have to do it...sometimes its just to satisfy my curiosity or enhance my knowledge ![]() 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#20 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Join Date: Nov 2002 
				Location: nyc 
				
				
					Posts: 3,540
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 use ipfw to blockout ips that you dont want connecting. 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |