First run the network setup wizard if you haven't already done so (options>network).
If you still encounter the problem and you have a static IP address, you can specify the IP in the network settings tab. The other option is (if your router supports UPnP) you can enable UPnP to try and find your address).
But the bottom line is, make sure you run the wizard because it'll usually automatically sort out these sort of network issues automatically. You may also have to forward the necessary ports on your router if you haven't yet done so.