Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Linux wireless repeater (range extender)

Discussion in 'General Wireless Discussion' started by tosiara, Jan 25, 2013.

  1. tosiara

    tosiara New Around Here

    Joined:
    Jan 25, 2013
    Messages:
    2
    Hi,

    I want to use my old laptop as a wireless range extender (temporary).

    Can anybody point me to any step-by step instruction for Linux?

    Thanks
     
  2. tosiara

    tosiara New Around Here

    Joined:
    Jan 25, 2013
    Messages:
    2
    Here is my solution using NAT (wireless bridge is not possible)

    Code:
    # create virtual wlan adapter and run HostAP
    iw phy phy0 interface add hostap.wlan1 type managed
    ifconfig hostap.wlan1 down
    ifconfig hostap.wlan1 hw ether 12:34:56:78:90:ab
    ifconfig hostap.wlan1 192.168.0.1 up
    hostapd /etc/hostapd.conf -B
    
    # start DHCP and DNS
    systemctl start dhcpd.service
    systemctl start named.service
    
    # connect to upstream AP
    wpa_supplicant -D wext -i wlan0 -c /etc/wpa.conf -B
    dhcpcd wlan0
    
    # enable NAT
    iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
    iptables --append FORWARD --in-interface hostap.wlan1 -j ACCEPT
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Hope this helps
     

Share This Page