A local home or sosho usually uses a provare LAN address. These IP addresses usually begin with
192.168.x.x
172.16-31.x.x
10.x.x.x
But to access a system from across the internet you need to have a PUBLIC IP address.
All ISPs (afaik) give your home one single public IP address. Then either they supply a router or else the user provides a router if you have more than one home system to connect.
To determine your public IP address, goto this website
http://www.whatismyip.com/ from your Fedora system's browser.
To detemine your private IP address (if any) perform this command from a teminal window;
ip addr
you'll see several ouput lines .. a set for each network interface. For example:
Quote:
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0e:35:45:4e:b0 brd ff:ff:ff:ff:ff:ff
inet 192.168.42.120/24 brd 192.168.42.255 scope global eth1
inet6 fe80::20e:35ff:fe45:4eb0/64 scope link
valid_lft forever preferred_lft forever
|
This says that my eth1 interface is assigned an IP address of 192.168.42.120 - a PRIVATE address.
===
So if your system has an interface assigned a PUBLIC IP address (unlike mine) then you can just use that IP address for a remote ssh session.
More likely your system has a PRIVATE IP like mine. In that case yo uneed to configure the router to "forward ports". THe router is going to be at the gateway address (use the
ip route command looking for the "default" line. So I need to go to 192.168.42.1 and change the configuration. For ssh service (on port 22) Iwould want to forward port 22 from the router to my system as 192.168.42. 120.
After the port forward is created then you can ssh to the public IP address (the router's address really) and it knows enough to forward that traffic to the server (192.168.42.120 in my case)
==
*** Be SURE you use real system passwords (not "root123") for your server accounts. Scripot kiddies will scan port 22 and try simple passwords.
==
More advanced topics to consider:
1/ Setup ssh to use keys and not password authentication to avoid the script-kiddies.
2/ Consider forwarding a different port to port 22 - ((public 433 => Private 22 for example)). This prevents the scans from showing an ssh port.
3/ Consider using a dynamic dns service, like dyndns.com. This allows you to have a resolvable hostname rather than use IP numbers. cronmon.syndns.com for example.
How to forward ports is related to your specific router.