Create a Wifi hotspot from ethernet connection

18,016

Solution 1

There are two general kinds of products:

  • Wireless access point: Just provides Wi-Fi access to an existing wired network. (I think these are also called "range extenders" in some stores.)
  • Wireless router: The same access point but combined with a router, to create a separate network (IP subnet). (Most wireless routers can be used as plain access points by disabling routing some 'router' features.)

("Hotspots" are just tiny versions of a wireless router. Yes, the hotspot feature in your phone or laptop includes a router.)

If I understand correctly, you already have a router, with the WiFi radio broken. So you should look for a plain access point – or alternatively, reconfigure a wireless router to act as a plain AP.

(Plenty of articles about the latter. Common keywords: "LAN-to-LAN" or "disable DHCP".)

If you have two routers, simply chaining/stacking a second router with no reconfiguration is also possible, and will work for outgoing connections, but can be a major pain as soon as you need to receive connections into the "inner" network. I'd strongly suggest avoiding this.

Solution 2

After a bit of looking around on Amazon, here's a small dedicated 2.4GHz access point. (Try searching for "wireless access point" if this one doesn't suit your needs)

However, if you're willing to use your existing laptop for the job or as a temporary solution, read below.

If you're using a Linux-based laptop/desktop there is a program called hostapd that allows you to setup your existing WiFi card as a fully functional AP. To install on a system using apt:

apt-get install hostapd
There are a few quirks to it such as no support for some cards, and setting up its configuration may be a bit confusing. I use it a lot, so for a bit of an example here's my configuration file (/etc/hostapd/hostapd.conf, with some modifications):
interface=wlan0
driver=nl80211
ssid=[Network name, ex. MyAccessPoint]
country_code=[Your country name, ex. US]
channel=[Set this to a channel not used elsewhere in your location, ex. 5]
auth_algs=1
hw_mode=g
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
wpa_psk_file=/etc/hostapd/wpa_psk (Make sure to write your password in this file)
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
own_ip_addr=192.168.24.1 24
Afterwards execute these commands as administrator:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o (ethernet device name, ex. eth0) -j MASQUERADE

Now you should be able to access the Internet from any device correctly connected to the access point. And maybe a bit of DNS tweaking :)

If your laptop uses Windows, here's a few alternatives.

Share:
18,016
Can't Tell
Author by

Can't Tell

Updated on September 18, 2022

Comments

  • Can't Tell
    Can't Tell over 1 year

    My wifi is not working, but I can access internet via ethernet cable. How can I make a hotspot with this connection? Is there some device I can use? I have tried searching on Amazon with the terms I now but haven't been able to know for sure what device I need.

    I don't want to create hotspot with laptop. I want a more permanent solution, and would prefer some simple dedicated device.

    Please forgive me if I am not using the correct terminology. I am no hardware expert.

    Appreciate your answers.

    • Moab
      Moab almost 6 years
      You would need a wireless router.
  • user1686
    user1686 almost 6 years
    OP did say they don't want to create a hotspot on their laptop... Beware that specific product recommendations are off-topic for SU, they get outdated very quickly.
  • Shadowcoder
    Shadowcoder almost 6 years
    Hey, I said "if you're willing" and "temporary solution", as well as telling the OP to search for "wireless access point" on Amazon if this one didn't work. In other words, I gave the OP a lot of options for solving his question.