It's easy, if the government controls the telecoms companies they simply ask them nicely to turn off the routers, this will effectively block the net on fixed landlines, although dial-up access will still be possible by dialling an international access number.
Stopping mobile internet access is a bit more tricky in areas close to borders with other countries, but anywhere more than 5 miles into the country will have very limited access.
Blocking satellite internet access is next to impossible to do reliably...
Hey, Quickbeam. That's really very funny. I felt like I was on the island in the Lost TV series, terrified of letting the clock run down to zero. (Needless to say, I didn't click the button!)
Alan 14: So, I take it that the (fixed) routers are all known and concentrated in a few locations. There's no such thing as someone running a fixed router in a secret location?
As for mobile and satellite internet access, it would seem that such is non-existent or near-so in Libya. I guess the secret is that if you want to overthrow a dictator you first have to get your hands on some satellite technology.
The main connections to the internet are in universities and the main telecoms data centres.
In the UK almost all traffic goes through Telehouse in London, but there's a couple of other centres for backup.
The reason I mentioned the telecoms companies is that most people connect to the internet via their phone line, so turn off the ISP connections in the phone exchanges and that's most of the problem gone.
As with most revolutions, the people who control the communications tend to take control, so the radio & TV stations will be the first target.