I stay in a hostel where the internet is completely controlled and administered by the college admin. Here almost everything is blocked, all kinds of direct downloads, no torrents nothing, you can only visit websites, u cannot even connect iTunes to the internet coz even that is blocked.
Anyways, coming to the point, I have an iPhone and I used to connect it through wifi by sharing my Mac's internet connection to Airport via Ethernet. It used to work sometime before but suddenly it stopped working. It detects the connection but when you connect it, it connects for some 2-3 secs and then the connection is dropped. I was in real disappointment as to whether my Mac's airport is malfunctioning or my iPhone's airport card is gone.
After sometime I found out that the college people have managed to block 2 or more connections from single IP, basically it didn't allow any router to connect to the internet. I seriously don't know what was the reason behind this stupid thing but thats true. So, what I would suggest is to contact your system administrator or if you are the administrator then talk to your ISP to unblock the thing. Take a breathe of relief as there is nothing wrong with your phone or Mac, so don't worry about that.
Hope it will be of some help!!