SemFio Networks

  • Home
  • About
  • Services
    • Wi-Fi DevOps with Mist
  • Partners
    • Mist
  • Training
  • Contacts
  • Blog
  • Home
  • About
  • Services
    • Wi-Fi DevOps with Mist
  • Partners
    • Mist
  • Training
  • Contacts
  • Blog

WLAN Pi - Bridge Wi-Fi Hotspot to Ethernet Interface

10/11/2019

1 Comment

 
In my previous article, I was explaining how you could configure the WLAN Pi to be used in a hotspot mode. Following the article, the configurations have been added to the new WLAN Pi image (starting at 1.7) and it is now part of the default WLAN Pi image (Thanks to Nigel Bowden and Jerry Olla).

​One of the feedback I got is that the Wi-Fi interface is not bridged to the ethernet interface. So, if you are connected to the Wi-Fi network, you will not be able to communicate back to the wired network.

So, in this article, I explain how you can configure the WLAN Pi to allow the Wi-Fi interface to be bridged to the ethernet interface. To make it work, I received huge help from Florent Lassia.

The first thing to do is to enable ip forwarding. To do so, open the /etc/sysctl.conf file and uncomment the following line:

    
This will enable traffic forwarding between the wlan0 and eth0 interfaces.

Then, we need to modify the DHCP server configurations in order to add the default gateway and DNS server information. To do so, open the /etc/wlanpihotspot/dhcp/dhcpd.conf file and add the following lines:

    
​Once this is done, you will have to reload the DHCP service on the WLAN pi using the following command:

    
​Here is the output you should see from running this restart test:

    
Then, we need to configure the firewall to allow communications between the two interfaces. In order to do so,  you need to modify a line in the /etc/default/ufw file. You will need to set the default forward policy to ACCEPT. It is set to DENY by default.

    
​Finally, we need to configure a NAT so that all the traffic coming from the Wi-Fi hotspot is natted behind the eth0 IP address. In order to do so, we need to modify the /etc/ufw/before.rules file. At the bottom of the file, after COMMIT, add the following lines:

    
​Once this is done, you can test your configurations by disabling and re-enabling the firewall. In order to do so, use the following command:

    
​Here is the output you should get:

    
Note: the configuration of both the /etc/default/ufw and /etc/ufw/before.rules will not revert back to the default if you go back to the normal mode of the WLAN Pi. You will have to manually re-configure them if you don't want to allow them in the normal mode.​

You can now reboot the WLAN Pi into the hotspot mode using the buttons and it should reboot in the Hotspot mode supporting these bridging configurations. You should be able to connect a client device to the Wi-Fi network and get network connectivity to the LAN if the WLAN Pi is connected to your LAN.

The plan now is to integrate this into the next version of the WLAN Pi image so it could be enabled by default in the Hotspot mode. To be continued…



written by François Vergès
1 Comment
Charles Clare
1/24/2020 19:53:58

It would be good to have 2 modes Hotspot mode and AP mode. Host spot mode is good when you want all your wifi devices to only use 1 ip on the Ethernet side and hide them (NAT) . It would be good if the DNS servers in hotspot mode were Ethernet DNS First and then 8.8.8.8 as secondary (in case Ethernet DNS was not working). Also having AP mode and HOST SPOT mode work in 5Ghz.
Maybe 4 Menu Options Hotspot 2.4Ghz Mode , Hotspot 5Ghz Mode and AP 2.4Ghz Mode and AP 5Ghz Mode would be perfect :-)

Reply



Leave a Reply.

    Picture

    François Vergès

    François Vergès is the founder of SemFio Networks. As a Network Engineer, he has a real passion for Wi-Fi.

    Picture Picture Picture

    Categories

    All
    5G
    5GHz
    6GHz
    802.11
    802.11ax
    802.11v
    802.1X
    AirConsole
    Aruba
    ArubaOS
    AutoCAD
    Automation
    Brand
    Capture
    Cisco
    Cisco WLC
    CLI
    Cloud
    Co-Channel Contention
    Controller Upgrade
    Course
    CWNE
    CWNP
    Design
    DFS
    Diagrams
    Ekahau
    FreeRADIUS
    Frequencies
    FSPL
    Hotspot
    Ideas
    Industry Canada
    Interference
    ISED
    Jetson Nano
    KRACK
    London
    MagicQuadrant
    MakeWi FiVisible
    MakeWi-FiVisible
    Market
    Meetup
    Mobility Express
    News
    Packet Analysis
    Programming
    Python
    Reference Guide
    Script
    Security
    SemFio
    Site-survey
    Site-survey
    Spectrum-analysis
    Technology
    Timeline
    Tip
    Training
    Validation
    Video
    Warehouse
    WiFi
    Wi-FI
    Wi-Fi
    Wi Fi 6
    Wi-Fi 6
    Wifitraining
    Wi Fi Troubleshooting
    Wi-Fi Troubleshooting
    Wireshark
    WLAN Pi
    WLPC
    WPA2

    Archives

    July 2020
    March 2020
    February 2020
    January 2020
    December 2019
    October 2019
    August 2019
    July 2019
    June 2019
    April 2019
    January 2019
    December 2018
    November 2018
    August 2018
    May 2018
    April 2018
    March 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    May 2017
    April 2017
    February 2017
    January 2017
    November 2016
    September 2016
    August 2016
    May 2016
    April 2016
    March 2016
    February 2016
    December 2015
    November 2015
    September 2015
    August 2015
    July 2015
    April 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    June 2014
    May 2014

    RSS Feed

SemFioNetworks-EmailContact SemFioNetworks-LinkedInProfile SemFioNetworks-YoutubeChannel

Let's Talk

Please get in touch with us if you have any questions. We offer a wide variety of professional Wi-Fi services that can help your wireless environment becoming faster, more secure and more efficient!
Get in touch
SemFioNetworks-Logo
Copyright © 2020 by SemFio Networks Inc.