I'm very new to the networking side of the house and am trying to set up SSH on my new Ubuntu machine. I have my DD-WRT router working with DDNS now and can log in to the router page -- but I'm not sure how to go about forwarding it to my server machine. I realize I would forward port 22 over (or a unique port) -- but to forward, DD-WRT wants to know the IP I'm pointing at. But that IP will change, won't it? How do I make the router point to the machine rather than the current IP? Or am I asking the wrong question?
As long as the DD-WRT router is also the DHCP Server for the network, you can set up a static DHCP lease for the server in DD-WRT in Services > DHCP Server under the Static leases section. This will make sure that the DHCP server always hands out the same IP address for your server when it asks for a DHCP lease.
In order to do this, you need to know the MAC address for the server. You can determine this with the command
Alternatively, you can also get the MAC address with
Fill in the MAC Address, hostname for the server and the desired IP address to the list of static leases in DD-WRT, Save, and Apply Settings. Note that if the IP address you set up for the static lease is not the one currently assigned to the server, you'll need to have the server give up its current lease and request a new lease from the DHCP server in order for it to get the permanent IP address.