Jump to content

SSH not connecting to correct server

kir13y
Go to solution Solved by kir13y,

I found the problem! Notice how it says "Via any router IP" under server-2 SSH rule. I needed to set the external IP forwarding to the correct port so that it doesn't just forward all ports to that server.

I have my network configured like this:
 

TDS Router -> Main Router (WiFi) -> Server Network Router  - Main Server (ubuntu)

                                                                                                   - Orange PI (debian distro)

 

So I have ssh servers running on both of the servers on the Server Network Router. They are both configured to use different ports. I have the Server Network Router port forwarding the respective ports to the correct servers. When I connect to the Server Network Router from the Main router (using the Server Network Router's internal ip address, assigned by Main Router), using either port, it will connect to Main Server. I can then use Main Server to ssh into Orange PI with it's internal ip address (192.168.2.xx). Any ideas on why both ports are going to the same box?

 

The TDS Router has ip addresses: 192.168.0.xx, the Main Router has ips 192.168.1.xx, the Server Network Router has ips: 192.168.2.xx. 

Main PC - Windows 10 (https://pcpartpicker.com/b/xjf8TW)

Spoiler

CPU: i7 6800k @4.2GHz (Kraken x61)

Mobo: ASUS x99 Gaming

GPU: ASUS GTX 1080 STRIX

RAM: 32GB DDR4 Ram

Storage: Intel 600p NVMe PCIe SSD (512GB), 2TB WD Green, 500GB WD Blue

Case: Phanteks Enthoo Evolv ATX

PSU: EVGA 850W 80+ Gold Modular PSU

Display: ASUS PH278Q (1440p 144hz gsync)

Keyboard: Corsair K95 RGB (MX Brown)

Mouse: Logitech G502 Spectrum

Audio: Logitech G930 Headset, Logitech Z506 5.1 Speakers

 
 

Server - Ubuntu

Spoiler

CPU: i5 3470 @3.2GHz (Stock)

RAM: 16GB DDR3 Ram

Storage: 2TB WD Green

 
 
 

Gaming Laptop - ASUS ROG G751JT-WH71(WX) - Windows 10

Spoiler

CPU: i7 4720HQ @2.6GHz

GPU: GTX 970M (3GB)

RAM: 16GB DDR3

Storage: 500GB Samsung 850 Evo, 1TB Toshiba HDD

Display: 17.3" display (1080p 75hz gsync)

 
 
 

Work Laptop - Razer Blade Stealth - Debian + KDE

Spoiler

CPU: i7 7500U @2.7GHz / 3.5GHz (Base/Turbo)

RAM: 16GB

Storage: 512GB M.2 SSD

Display: 13.3" QHD+ 3200x1800 touchscreen (16:9)

 
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

image.png.f828f25b8347d54c82b655a00659a2f4.pngThey are all on different ports. Also forgot to mention that I'm using Openwrt on Server Network Router with LuCi.

Main PC - Windows 10 (https://pcpartpicker.com/b/xjf8TW)

Spoiler

CPU: i7 6800k @4.2GHz (Kraken x61)

Mobo: ASUS x99 Gaming

GPU: ASUS GTX 1080 STRIX

RAM: 32GB DDR4 Ram

Storage: Intel 600p NVMe PCIe SSD (512GB), 2TB WD Green, 500GB WD Blue

Case: Phanteks Enthoo Evolv ATX

PSU: EVGA 850W 80+ Gold Modular PSU

Display: ASUS PH278Q (1440p 144hz gsync)

Keyboard: Corsair K95 RGB (MX Brown)

Mouse: Logitech G502 Spectrum

Audio: Logitech G930 Headset, Logitech Z506 5.1 Speakers

 
 

Server - Ubuntu

Spoiler

CPU: i5 3470 @3.2GHz (Stock)

RAM: 16GB DDR3 Ram

Storage: 2TB WD Green

 
 
 

Gaming Laptop - ASUS ROG G751JT-WH71(WX) - Windows 10

Spoiler

CPU: i7 4720HQ @2.6GHz

GPU: GTX 970M (3GB)

RAM: 16GB DDR3

Storage: 500GB Samsung 850 Evo, 1TB Toshiba HDD

Display: 17.3" display (1080p 75hz gsync)

 
 
 

Work Laptop - Razer Blade Stealth - Debian + KDE

Spoiler

CPU: i7 7500U @2.7GHz / 3.5GHz (Base/Turbo)

RAM: 16GB

Storage: 512GB M.2 SSD

Display: 13.3" QHD+ 3200x1800 touchscreen (16:9)

 
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I found the problem! Notice how it says "Via any router IP" under server-2 SSH rule. I needed to set the external IP forwarding to the correct port so that it doesn't just forward all ports to that server.

Main PC - Windows 10 (https://pcpartpicker.com/b/xjf8TW)

Spoiler

CPU: i7 6800k @4.2GHz (Kraken x61)

Mobo: ASUS x99 Gaming

GPU: ASUS GTX 1080 STRIX

RAM: 32GB DDR4 Ram

Storage: Intel 600p NVMe PCIe SSD (512GB), 2TB WD Green, 500GB WD Blue

Case: Phanteks Enthoo Evolv ATX

PSU: EVGA 850W 80+ Gold Modular PSU

Display: ASUS PH278Q (1440p 144hz gsync)

Keyboard: Corsair K95 RGB (MX Brown)

Mouse: Logitech G502 Spectrum

Audio: Logitech G930 Headset, Logitech Z506 5.1 Speakers

 
 

Server - Ubuntu

Spoiler

CPU: i5 3470 @3.2GHz (Stock)

RAM: 16GB DDR3 Ram

Storage: 2TB WD Green

 
 
 

Gaming Laptop - ASUS ROG G751JT-WH71(WX) - Windows 10

Spoiler

CPU: i7 4720HQ @2.6GHz

GPU: GTX 970M (3GB)

RAM: 16GB DDR3

Storage: 500GB Samsung 850 Evo, 1TB Toshiba HDD

Display: 17.3" display (1080p 75hz gsync)

 
 
 

Work Laptop - Razer Blade Stealth - Debian + KDE

Spoiler

CPU: i7 7500U @2.7GHz / 3.5GHz (Base/Turbo)

RAM: 16GB

Storage: 512GB M.2 SSD

Display: 13.3" QHD+ 3200x1800 touchscreen (16:9)

 
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×