Make and model of hub, please. And what is on the other end of the Ethernet cable?
It may just work if you are connected to a router providing IP address and DNS via DHCP.
Your Mac needs an IP address (something like 192.168.1.x) on the local network and the address of a DNS server which translates names like forums.macrumors.com into its IP address. These are usually provided by your router using a protocol called DHCP.
Since you have been successfully using your Mac over Wi-fi, you can take it that the router is configured correctly and