To resolve a host, you need UDP 53 outgoing (I'm supposing you're behind a stateful firewall). To use wget and curl with default port options, you will need TCP 80 outgoing. You will not be needing any incoming ports for this specific purpose.
To check whether you can resolve hosts, you can use the dig command. If you wished to resolve www.google.com using OpenDNS, you would type the following command :
dig @208.67.222.222 www.google.com
and you should get the following answer :
; <<>> DiG 9.7.3 <<>> @208.67.222.222
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55450
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 516333 IN NS d.root-servers.net.
. 516333 IN NS l.root-servers.net.
. 516333 IN NS h.root-servers.net.
. 516333 IN NS k.root-servers.net.
. 516333 IN NS g.root-servers.net.
. 516333 IN NS i.root-servers.net.
. 516333 IN NS f.root-servers.net.
. 516333 IN NS c.root-servers.net.
. 516333 IN NS j.root-servers.net.
. 516333 IN NS a.root-servers.net.
. 516333 IN NS m.root-servers.net.
. 516333 IN NS b.root-servers.net.
. 516333 IN NS e.root-servers.net.
;; Query time: 36 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Mon Aug 15 19:17:11 2011
;; MSG SIZE rcvd: 228
The dig answer may vary from host to host but you should not get any empty "ANSWER SECTION".
If you can resolve using OpenDNS using dig but not using wget or curl, that means that your system has not reachable DNS server configured. If that is the case, consider editing /etc/resolv.conf