Share Windows WiFi with Ubuntu PC through wired LAN

9,457

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
Share:
9,457

Related videos on Youtube

KrisWebDev
Author by

KrisWebDev

Updated on September 18, 2022

Comments

  • KrisWebDev
    KrisWebDev almost 2 years

    How to setup this?

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

  • RatherLogical
    RatherLogical over 4 years
    You're a life saver dude, I hate the way windows makes you use the GUI for this kind of stuff.