I have following network structure

PC  <-- USB cable -->   Android Smartphone <--> MyWiFi
IP=        IP=       IP=
NM=        NM=???                  NM=
DG=       DG=???                  DG=???

Laptop <--------------> MyWiFi
IP=       IP=
NM=        NM=
DG=       DG=???

... where MyWiFi is my home WiFi network

Note: The PC can "ping" the Laptop, but the Laptop cannot "ping" the PC.

When I traceroute from the PC, I get the following:

traceroute to (, 30 hops max, 60 byte packets
 1 (  2.163 ms  2.870 ms  3.339 ms
 2 (  14.562 ms  14.915 ms  11.876 ms

Routing from the laptop is:

ip route
default via dev wlp2s0  proto static  metric 600 dev wlp2s0  scope link  metric 1000 dev wlp2s0  proto kernel  scope link  src  metric 600 

So it seems confirmed that my Android Phone stands as gateway between the PC and the WIFI router.

Both computers PC and Laptop have Ubuntu installed and Nautilus + Samba in order to share folders. The problem is that the PC cannot see the share folders of the Laptop

I have already shared folders between other computers that connect directly to MyWiFi, but I think in this case the tethering is spoiling the sharing.

How can I share folders, even though I am connecting the PC to the WiFi via tethering?

  • How is the PC tethered to the Android? Cable? Bluetooth? can the PC ping the default gateway of MyWiFi? Can it ping Please edit your question to provide this valuable info and then leave a comment @Fabby 0:-)
    – Fabby
    Jul 18, 2019 at 22:14
  • This is confusing,... are you sure you use tethering ? Jul 19, 2019 at 13:25
  • @Fabby Thanks for the questions. I just did what you asked for. Every ping worked properly. Jul 19, 2019 at 13:46
  • Ah. Please edit your question and provide the whole picture in the PC <-- USB cable --> Android Smartphone <--> MyWiFi line: all of their IP addresses and Default gateways because you don't have a samba issue but a networking issue. also add the full samba config to paste.ubuntu.com and provide a link to that in your question too. so make your question easy to understand from a full networking perspective... ;-)
    – Fabby
    Jul 19, 2019 at 14:11
  • 1
    I agree with @Fabby this is a network issue, specifically having two subnets. The simple solution would be to connect the PC to the router by an Ethernet cable or a WiFi dongle. Then you will have both PC and laptop on the same subnet.
    – user68186
    Jul 19, 2019 at 22:30

2 Answers 2


Here your Android Smartphone indeed works as gateway but partially you also have to configure routes from laptop side.

The reason behind PC cannot see the share folders of the Laptop is that Laptop routes packets through your wifi router. You need configure your android smartphone's ip address as gateway in your laptop.

Currently gateway of laptop is router. Please remove ip address and configure smartphone as gateway in your laptop's network configuration. After applying configuration, it should work.

You can check routes of laptop using route -n command.

  • 1
    Thanks a lot @Ketan Patel, it really worked! Just by replacing the gateway I could access the PC from the laptop and, not only ping the PC's address, but also mount samba from the laptop by standard command smb:// on nautilus Jul 23, 2019 at 21:40

Because the PC can "ping" the Laptop, I can at least access the Samba shared folders of the Laptop (IP from the PC. I have to use following command in the nautilus bar of the PC.


In that way I can do at least exchange from the PC.


The same as the other answers. The IP of the Laptop may change, and therefore the command should be adapted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.