Both Mac OS and Linux have nice graphical tools to change and display the IP address of the machine itself. This is always the internal IP address; it's the router that translates (through something called NAT,
network address translation) internal IP addresses to the single external IP address and vice versa.
Anyway, if you can't find that nice graphical tool (which one to use depends on the operating system) you can use the global Linux command line way:
- open a terminal.
- type "/sbin/ifconfig".
- look at the results.
There may be multiple results; usually there is an interface called "lo" which is the loopback address, and you can ignore this. "eth0", "eth1", etc are the wired network interfaces. If I recall correctly the wireless network interfaces are called "w0", "w1", etc. You usually only have at most one wired network interface and at most one wireless network interface, so "eth0" and "w0" are the ones to look for.
As for connecting from the outside world (WAN), first ask yourself if you really want to do this. You're opening up your machine for the world, so you'd better make sure it's properly secured. Keep all your software up-to-date, and don't open any ports that aren't necessary.
There are two layers of security: the firewall on the machine itself, and the firewall / NAT on the router. Linux mostly uses iptables for its firewall, with a multitude of front-ends. Ubuntu uses "ufw" as the command line front-end and "gufw" for the graphical front-end. The latter does not come installed by default so you must install it through Synaptic. I can't tell you about other Linux distributions.
The router has its own configuration, and this is different for each router brand and type. But what you must do is add a port forwarding rule for any service you want to allow. The server must have a fixed IP address, as it will only be referenced based on IP address. The port forwarding rule essentially says "if the router receives any data for port X, forward this data to port Y* on server A.B.C.D". Check out the router manual for more detailed instructions.
* X and Y may be the same, like 3306 for MySQL, but they can be usually different if needed.