well i blocked switched ip on my router for internet access but the switch gives me an internet connection error when i want to connect to a wireless network
Yes this should work. Background is that the switch first tries to contact those servers when you connect to wifi. If they aren't found, you'll get an error and the switch disconnects.