Local IP is in a different range (192.168.42.xxx), so I cannot port forward

Hello. I wanted to setup OpenSSH so I could access my computer with the terminal with another computer in case if there’s a problem. However, after checking with the ip address command, my local IP is not 192.168.0.xxx, instead, it’s 192.168.42.xxx. This happens because I’m using my phone for connecting my computer to the internet. I do not have any Wi-Fi adapter, and the only one I had didn’t work with Linux and it later broke.

Because I’m using tethering, my computer cannot see any local IPs on the same network, other than 192.168.0.1, which is the router, as such, my other computers on the same network cannot see the computer. Oddly enough, the router’s page cannot see my computer, so when I try to port forward something like OpenSSH, it doesn’t work.

I tried searching it up online, but the only fixes were for Windows.

If someone has an idea of a fix for this, please tell me. Thank you.

That is the Android USB tether interface.
.

It’s not the same network.

You would have to turn Android into a router, not sure if rooting it can make that possible…, by default it’s not.

Can you wire your computer to the router instead of USB tether?

1 Like

Ohw, btw Welcome :slight_smile:

1 Like

the router is downstairs, and i can’t move it upstairs because there is no place.

Then for some weird reason I was able to connect to a local IP with tethering before it just broke for some reason. Using mobile data also made me able to “connect to a local IP” (more like connecting to my own IP), but that won’t fix the hosting issue, and I only have 4 gigabytes of data.

I can’t root my Samsung Galaxy A50, it’s my main phone (up until around August 2021). The only rooted phone I have is some Samsung Galaxy Note 3 with a dying battery.

How about getting a cable upstairs?
Or how about an Access Point in Client mode connected directly to upstairs PC’s network port?

If that happens, then there’s going to be a chance i’m going to trip over the cable, cause my computer upstairs is in my bedroom, and the stairs for downstairs is in the kitchen.

:thinking: I don’t understand what you mean.

I also live with my father, so basically I don’t have total control of the house (or should I say, apartment).

This is basically a repeater that has an Ethernet port. You can connect your System via a Ethernet cable to that repeater and the repeater is connected via Wifi to the downstairs router.
But since other devices might also connected to it, @Pippin suggested to run it in Client mode. This means it uses the Wifi only for the connection to the router and doesn’t extend the Wifi network.

In other words, it will do what your Smartphone does, but without the NAT for an extra network. And it uses Ethernet instead of an USB connection.


But why not get an Wifi card for your system that works? Or a USB-Wifi adapter? Maybe a little cheaper then a repeater with an Ethernet port.

Or you might want to look in at Power-line communication. Depends a little bit on the power cabling in your apartment, if it is a option.

It doesn’t matter what you do, if you want to access your System form the main LAN, you need to get rid of that tethering stuff.

The last one I had didn’t even properly supported Linux, the only drivers available for that model were too old for my now-former installation of Linux. And I had a lot of issues with it, sometimes it randomly disconnected and I had to wait 5 minutes before getting back online (although this happended in Windows, as I used my phone for that installation of Linux as well).

Good idea, but replacing the aging computer from 2012 is probably more worth it. My father and I had plans (since around 2019) of replacing the computer with newer better hardware, but COVID ruined those plans. I think my dad was looking of installing a Wifi card into some computer (forgot which one, ethier my main 2012 PC or some old dusty 2005 PC) or something like that.

Edit: Another problem I have with tethering is that if I need files from my phone, say like, 8 month old Discord screenshots, then I can’t be online because ethier I transfer my files, or I’m online. This reminds me of dialup’s biggest issue.