This page will go more in depth of Port Forwarding
First we will need to find the Default Gateway (Which is the gateway your router interacts with your computer). To do this is incredibly easy. First you must go to the Start Menu (Button farthest to the left on your taskbar, assuming you are using Windows Vista through 7) On XP you simply need to click the windows button + R. Then type cmd into the search bar and press enter. A Command Prompt window will open and you will then type ipconfig into the black window. There should be a list of what looks like a bunch of periods and numbers. Look for the one that says Default Gateway . . . . . . . . . : [A Number Here]. Copy that down (In case you are a bit confused mine is 192.168.1.1 but that doesn't mean yours is as well).
Open Your BrowserEdit
Open your browser and the number you acquired from the Command Prompt into your browser, A window should pop up asking for a username and password. Usually it is just Username: Admin Password: Password but if that doesn't work just leave the username blank and type the password of the router into password. Now you should be in your router configuration settings, look for a button or a link that says Port Forwarding, you may need to search a bit. Once you have found it click it (Obviously) and then look for a dropdown window that may say TCP on it. Change that to TCP/UDP (If it already is good for you, now leave it alone) Now you need to go back to the Command Prompt type in ipconfig, and look for something that says IPV4 Address...........:[A Number Here]. Copy that down. Go back to your router's configuration page and where it says Local IP or IPv4 type the number you just got into this. Around that there should be a box that says Port type in Terraria's default port (7777) and click Save Changes. Than you are done just start your server with the port of 7777!