Share Windows WiFi with Ubuntu PC through wired LAN

2

1

How to setup this?

WiFi Internet connection <> Windows Laptop <> Wired LAN <> Ubuntu PC

KrisWebDev

Posted 2016-06-25T12:12:34.550

Reputation: 578

Answers

4

On the Windows PC:

  • Connect the PC to the WiFi and ensure Internet connection is working locally
  • Connect the PC to the LAN and ensure the Ubuntu LAN IP is reachable
  • You'd better use fixed IP adresses on the LAN instead of DHCP, or make DHCP reservations on the LAN router
  • Go to Control Pannel > Network & Sharing > Network Connections > right-click on the WiFi connection > Properties
    • WiFi connection: On the Share tab > Allow other users to connect... If you don't see the share tab, you may want to disable this feature on the other connections (the wired one) for the tab to appear.
    • WiFi connection: On the Network tab, Internet Protocol version 4 > Properties > Advanced > Disable Auto metric. Use a low metric (eg. Interface Metric = 5).
  • Run ipconfig from a command prompt and note the Ethernet connection (wired LAN) IP address (<IP>).

On the Ubuntu PC:

  • Run sudo ip route add default via <IP> proto static metric 50

Tips to debug:

  • Windows:
    • ipconfig /all
    • route PRINT
    • tracert 8.8.8.8
  • Ubuntu:
    • ifconfig and nmcli dev show
    • ip route
    • traceroute 8.8.8.8

KrisWebDev

Posted 2016-06-25T12:12:34.550

Reputation: 578

You're a life saver dude, I hate the way windows makes you use the GUI for this kind of stuff. – RatherLogical – 2019-11-21T05:49:13.027