static IP and port forwarding questions
andrewjs18
Enthusiast - Level 1

how do I set static IPs for devices within my LAN on the MI424WR-GEN3I router?

also, is it possible to allow more than 1 internal IP to have a similar port forwarded to it?  for example, I have two devices within my LAN that run ubuntu and I'd like to be able to access them both using SSH (port 22).  Is it possible to set up the forward to go to two different LAN IPs?  It was giving me conflict errors when I was trying to do it a little while ago.

Thanks,

Andrew

0 Likes
Re: static IP and port forwarding questions
prisaz
Legend

@andrewjs18 wrote:

how do I set static IPs for devices within my LAN on the MI424WR-GEN3I router?

also, is it possible to allow more than 1 internal IP to have a similar port forwarded to it?  for example, I have two devices within my LAN that run ubuntu and I'd like to be able to access them both using SSH (port 22).  Is it possible to set up the forward to go to two different LAN IPs?  It was giving me conflict errors when I was trying to do it a little while ago.

Thanks,

Andrew


I like to use the advanced settings, and still use the DHCP. Under Advanced Setting > IP Address Distribution > Connection List, you would edit the connection for the device that is assigned an IP address. There you select assign static. The only issue I find with that configuration, it does not allow you to change the IP you wish to assign, like you would in a real DHCP server. But it does allow you to set the IP as static based on the MAC address.

In regards to your SSH servers. An incoming port is an incoming port and can only go to or be forwarded to one device. 

Say SSH server 1 is running on 192.186.1.201 you would forward Any to that IP from port 22

Say SSH server 2 is running on 192.186.1.202 you would forward Any to that IP from port 2022

If you are running say WinSCP to access your SSH boxes, or what ever program, you would just use public IP:22 for SSH1, or public IP:2022 for SSH2. This would just allow you to use an alternate port for the second server, thus preventing any conflict. You will need to set your second Ubuntu box SSH server to listen on port 2022. I never used the standard port on my internet connected SSH servers anyway. To much of a security issue. It would indicate exactly what server you are running. Pretty much pick an alternate port you wish. I was running SSH, and used to set it at Windows RDP port 3389 just to confuse people trying to hack the port. Plus that RDP port was one outgoing port my employer was not blocking at the time.;-) Thus I could make a SSH connection over the RDP port and they would have no clue with the 2048 encryption set. Now everything is blocked and filtered. So they blocked all the holes.

To change the SHH port:

Once you have root access open the file /etc/ssh/sshd_config and search for Port, it should show 22 as the default value. Change 22 to any port you want that is not already being used on the system.

If you wish to use a SSH tunnel, for VNC remote desk top. You may not want to use an RDP port address.

Example for router to forward port 2022 to your second server.

image

0 Likes
Re: static IP and port forwarding questions
Hubrisnxs
Legend
Re: static IP and port forwarding questions
prisaz
Legend

@Hubrisnxs wrote:

Good info because I really did not get into port forwarding. But I don't think you can have two different internal devices on the same port number, and forward to them both based on IP, and the same port number. Just kicking around some thoughts. And I really missed the boat on selecting the HOST name on the left to change the IP address when setting it to fixed. I am sure I had used that once before. Or twice.

They would need to be separated.

Static IP good info.

How to get the same IP assignment per device

Port forwarding good info.

Port Forwarding Instructions for the FiOS MI424 Router

Same SSH Server Service on two machines accessed from the outside, I still know alternate ports would be need for the second server. Can't forward the same port to two different machines. Which way would I go? The forwarding would need to know which box to hit. Smiley Wink

All together with the good info you provided in your links, the OP should be able to make it work.

It may be possible to use the internal DNS to forward to port 22 based on host name. The host name maybe defined in the actiontec dns under advances settings? Then both could use port 22 and be access externally? I just think it would be easier if alternate ports were used.

ssh1.useraccount.dyndns.org forward to port 22

ssh2.useraccount.dyndns.org forward to port 2020

Or something along those lines. Not sure. I have never tried that route.

But I have used forwarding based on alternate port numbers to the same Server Service on different boxes.

0 Likes
Re: static IP and port forwarding questions
Hubrisnxs
Legend

definetely point different ips at different ports,    you were spot on there.  :]

0 Likes