Welcome to WebmasterWorld Guest from 220.127.116.11
*.example.com. 86400 IN A 192.168.0.1
Having done that, add a 301-Redirect to redirect requests for all resources at all non-canonical hostnames to the same resources at the canonical hostname.
If you have a unique IP address for your server (whether it's on shared hosting or not), then you should be able to do all of this yourself. If you share an IP address with other sites hosted on the same server, then you may have to ask your host for help in order to get wild-card subdomains working.