I am using Ubuntu 16.04 LTS on both my client and server computer. The server is running the OpenSSH-server software and I have no problem connecting to it locally. I cannot, however, connect to it remotely (with public IP).
I have forwarded ports to the server in question and I have disabled Ubuntus firewall. I also tried listening for different ports (1022 and 24444) with forwarding enabled without any success. The same error message keeps on showing: Network is unreachable.
What am I doing wrong?
ifconfig client
wlp2s0 Link encap:Ethernet HWaddr f4:8c:50:ad:69:93
inet addr:192.168.38.107 Bcast:192.168.38.255 Mask:255.255.255.0
inet6 addr: fe80::98db:f0f5:697f:6efc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38317 errors:0 dropped:0 overruns:0 frame:0
TX packets:28963 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30213501 (30.2 MB) TX bytes:5871287 (5.8 MB)
ifconfig server
enp3s0 Link encap:Ethernet HWaddr 1c:1b:0d:ff:19:35
inet addr:192.168.38.176 Bcast:192.168.38.255 Mask:255.255.255.0
inet6 addr: fe80::bdef:8a38:24ec:7c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:425268 errors:0 dropped:0 overruns:0 frame:0
TX packets:209099 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:160570677 (160.5 MB) TX bytes:81972815 (81.9 MB)
Server is connected to Jensen 7000AC router via cable and client is connected to same router via Wifi.
sudo netstat -natpeand identify the port you should expect it to be listening to and the interface (if it's different from 0.0.0.0 you may have the service open to local only)ss -tlwould be a good option replacing netstat that is deprecated – ignivs Jan 02 '18 at 14:47tcp 0 0 0.0.0.0:24444 0.0.0.0:* LISTEN 0 91797for every port I have tried. – Dreuhn Jan 02 '18 at 15:43LISTEN 0 128 *:ssh *:*when using ss -tl. – Dreuhn Jan 02 '18 at 15:49sudo ufw statusandsudo iptables -LWhat you mean with the "I have forwarded ports to the server in question"? are you trying reaching the server from the client you mentioned or the outside of that network. Can you explicit your ssh or telnet command you are issuing to test?
– ignivs Jan 02 '18 at 20:21