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