0

I have two PCs with Ubuntu 14.04 LTS installed.

Both are connected through a switch.

I'm using the internet from my android smartphone which is connected as usb ethernet.

I'm trying to share Internet through edit wired connection and option used is share to other computer but this connection does not appear on the other computer.

The computers can successfully ping each other.

What settings am I missing to be able to share my internet through a switch.

Ziazis
  • 2,164
  • 10
  • 20
  • Have you added the default gateway on the other computer to be your computer that shares his internet? – Ziazis Aug 10 '17 at 06:44
  • exactly, my another computer connected through a switch. and i m using internet through android. how can i share with second computer – Vikash Kumar Aug 10 '17 at 06:45
  • 1
    Possible duplicate of [How to Connect & Share your Internet Connection (Wired & Wireless)](https://askubuntu.com/questions/171914/how-to-connect-share-your-internet-connection-wired-wireless) – Ziazis Aug 10 '17 at 06:46
  • yeah, that is a switch. – Vikash Kumar Aug 10 '17 at 06:47
  • Wired connection not appear in second computer. – Vikash Kumar Aug 10 '17 at 06:49
  • 1
    You have a wrong assumption, the sharing won't suddenly create a new connection available for selection on your other computer. What you are essentially doing is allowing other computers to send packages to your computer which afterwards forwards them. The 'share...' only allows that. So what you have to do after doing that is adding the computer as a default gateway(=send all packages to this guy!) on the computer you want to use the shared internet on – Ziazis Aug 10 '17 at 06:55
  • how could I found Pakage – Vikash Kumar Aug 10 '17 at 07:24
  • What is the ip address from the computer you want to share the connection on? – Ziazis Aug 10 '17 at 07:30

1 Answers1

0

Is your switch able to act as a router? This would be the easiest way: plug your mobile phone on the dedicated port (most of them have one, or you'll have to configure it using your router software).

An other way is to plug your phone using USB on a PC and use this PC as a router. You'll have to use IPTables to do so. The interface on this PC connected to your phone (just tried: identified here by the name enp0s20u6 ) will be the gateway to access the Internet. The ethernet interface on this PC will be the default gateway on the other one.

Just for the record: you can use your phone as a router too. Android is just another Linux flavour.