Wifi as WAN
SNBForums Code of Conduct SNBForums is a community for everyone, no matter what their level of experience. Please be tolerant and patient of others, especially newcomers. We are all here to share and learn! The rules are simple: Be patient, be nice, be helpful or be gone!
Axel Spallek
New Around Here
Hi.
I wonder if it is possible with merlin to configure Wifi as WAN. I have a customer, who wants to connect his machines to the internet and to the OpenVPN of the manufacturer for support purposes. He has wifi, but does not want to put ethernet-cables to the machines. The Routers should have detachable antennas, because they will be installed in the electrical cabinets because of the dirt in the production area, so the antennas will be installed on the outside of the cabinets. So I bought 5 x RT-N18U because of its detachable antennas. With the stock firmware I can configure openwrt and the private ip-area of the machine needed for openvpn. But I can not connect to wifi as WAN as I always do with openwrt.
Openwrt does install on RT-N18U, but Wifi is not supportet .
Now I installed merlin. No luck with the gui. Is it possible to achieve that by command line?
Sincerly,
Axel
ColinTaylor
Part of the Furniture
There is no official support for Merlin on the RT-N18U. Merlin doesn’t make firmware for the RT-N18U. Ask the person that made the firmware you are using for support.
RMerlin
Asuswrt-Merlin dev
Asuswrt-Merlin: Customized firmware for Asus routers
Github: github.com/RMerl — Twitter: RMerlinDev — Libera: #asuswrt
See the sticky post for more info.
eibgrad
Part of the Furniture
You can always convert *any* wired device to wireless, including the WAN of any router, using a standalone ethernet bridge. That ethernet bridge can either be another router that supports client bridge mode (e.g., dd-wrt, tomato), or retail product designed specifically for that purpose. Having this capability built into the Merlin might be nice, might be more convenient, but its absence shouldn’t be a showstopper. Just takes additional equipment.
Klueless
Very Senior Member
Five? Why do you need the WAN port? Can’t they all be configured to be wireless access points to your main router?
Axel Spallek
New Around Here
Thank you for your replies.
I decided to take that approach:
With the original Firmware, I will use the media-bridge mode. The machine in the back and the RT-N18U will have fixed IP-Adresses in a Subnet different than the company net. A 6th router will be placed in the network room. On its client (mostly yellow) ports it has a fixed IP in the subnet of the fixed IPs of the 5 Asus routers and will be plugged into the company network. No DHCP there because I do not want to interfere with the company DHCP. This router will be the defauklt gateway for the machines. On its Internet port (blue) it will be a DHCP client also plugged into the company network.
Machine1 192.168.7.2/24 GW192.168.7.1———WLAN Bridge1 RT-N18U 192.168.7.100/24 GW 192.168.7.1 ——WIFI——-Company WLan AP 192.168.1.x———Company Switch1——-6th Router 192.168.7.1/24 static and wan interface is DHCP Client 192.168.1.x ——Company Switch1 192.168.1.x——-192.168.1.x Company Internet GW Router internet address ———Internet
Machine2 192.168.7.2/24 GW192.168.7.1———WLAN Bridge2 RT-N18U 192.168.7.100/24 GW 192.168.7.1 —WIFI—to Company WLan.
Machine3 192.168.7.2/24 GW192.168.7.1———WLAN Bridge3 RT-N18U 192.168.7.100/24 GW 192.168.7.1 —WIFI—to Company WLan.
Every Machine needs a separate Asus, because no ethernet cable is available (huge manufactoring space) and the company does not want to install one, even not between the machines. But WLan is available everywhere.
The 6th router has the openvpn tunnel. I have that config working (but without wlan) at another customers place.
Two problems:
1. Does Asus RT-N18U support static IP in Bridge m Mode. I have to check that.
2. The other customer insists, that since my router is in his network, the whole network brakes down from time to time (once every week). We unplugged it and I wait for the next brakedown which will appear hopefully to proof it is not my routers fault. They have several strange things in their network, as example using internet addresses for their machines (140.80.1.x/24) which I route through openvpn tunnel. But I suspect a hardware failing switch.
Does anyone have a clue, if the problem described in 2. could eventually be the fault of my router configuration anyway?
Admittedly, it looks quite strange: the blue port connects to its own yellow port and one yellow port connects to the company network.
Wifi as wan port
Welcome to your friendly /r/homelab, where techies and sysadmin from everywhere are welcome to share their labs, projects, builds, etc.
EDIT: This is for using the pfSense box as a CLIENT to an AP, not as a bridge or repeater.
First off, I thought it was simple, I was wrong. If anyone ever needs this odd scenario, here’s how to do it.
- Install a fresh pfSense OS as normal and accept an Ethernet port (lan0, alc0, or eth0) as a WAN port initially to let it stop complaining. I did this without an actual internet connection, it still complained. I left the LAN blank.
- Log into pfSense web interface. I had to use the magic of auto-DHCP from a different source (Windows shared connection for instance). Having an intelligent Ethernet switch works wonders too.
- Navigate to Interfaces -> Assignments -> Wireless; make sure your Wireless adapter or embedded WiFi is recognize and set it up as «Infrastructure (BSS)»
4a) Navigate to Interfaces -> Assignments; add your WiFi as LAN, initially. save. then flip them: xxx_wlan0 as WAN and alc0/eth0 as LAN
4b) Make sure your private subnet, mask, and DHCP server is setup on LAN before or during these sequence of events, I forgot to document when I actually did this, it could have been before I flipped the WAN and LAN assignments.
5) Navigate to Interfaces -> WAN; Configure your Wireless settings and enter all information to CONNECT to the wireless Access Point. It may seem it is being setup as an Access Point, don’t worry, it’s not.
6) We’re not even close to being done. Mine might be buggy, so I needed a way to auto-connect on boot because it derps. So I created a file called «wifi.sh» in the folder «/usr/local/etc/rc.d» and had just two lines:
ifconfig _wlan0 down ifconfig _wlan0 up
Replace with the actual interface prefix.
Notes: I did try the way with «wpa_supplicant» and configuring, but it either worked half the time, or just threw continuous errors on the prompt.
7) Make some adjustments to the WAN wireless settings for quicker connection on boot (like setting the channel number to a fixed value if your wifi router will never change its channel).
What I have right now works 100% and I’m enjoying my firewall that is connected to a wireless access point and using that adapter as a WAN port while the Ethernet port goes directly to my switch and serving+protecting the internet to all my racks and devices connected via Ethernet.
If you’re too lazy like I was for over three years, you can always use Windows internet connection sharing (easy in 7/8.1/10/2008). :p I finally got the chance to re-purpose gear into a 1U just to pull this off. It would have been overkill before as pfSense on a 2U hosting a mid-high range CPU with a compliment of hard drives is kinda silly. It was easier just to enable ICS and have Wifi be the shared adapter at the time.
OpenWrt: How to use wifi as WAN connection?
My internet provide only provides wifi / WLAN in my home. I don’t have a wired connection to the outside world.
Goal
Question
Previous research
I’ve read many questions here on SE and on the internet talking about bridging and how to do it. I ended up with 16 lost hours and no showable result.
1 Answer 1
I advice you to start from a freshly resetted / installed system.
Introduction
- Open your Web UI (192.168.1.1)
- Go to Network -> Wireless
- It should look something like this:
- Notice:
- «radio0» and «radio1» can be interpreted as «wifi device 0» and «wifi device 1»
- The Radios might show a message «inactive». Don’t bother about that
- A «radio» is nothing you can connect to from your computer. Your computer will connect to a Network.
- There are already two networks set up — one for each radio. One with SSID OpenWrt2 and one with SSID OpenWrt5 .
- Both of them are disabled. You can test your wifi connections by Enable button and connect to it for another device.
- Notice:
Setup
For the following I presume that
- Your WAN wifi uses 2.4 GHz
- Your LAN wifi uses 5 GHz
- Your Wired LAN and wifi LAN will be on the same network.
- Many tutorials tell you to change the static LAN IP address of your router. Don’t. It won’t work anyway.
- Open Network -> Wireless on your OpenWrt web interface
- Enable your 5 Ghz network by pressing the Enable button. Try to connect to it (Don’t worry about the encryption for now). If you cannot connect to it, stop here and go for troubleshooting.
- Remove the 2.4 Ghz network by clicking the Remove button. (in the picture above this amounts to the OpenWrt2 network)
- On you 2.4Ghz radio / wifi device, click the Scan button
- Wifi access points in your vicinity should show up.
- Press Join this network on the wifi that should become your WAN
- You should be presented with the Joining Network screen. It looks like this:
- Leave everything as is. Just enter the password for the wifi you’re trying to join (the WAN wifi) into the WPA passphrase field.
- Press Submit .
- You should be presented with the Device Conficuration Screen. It should look like this:
- In the top ( Device Configuration ), go to Advanced Settings , set Country Code to your country. This will ensure that radio laws of your country are being followed.
- Go down to the Interface Configuration section, General Setup tab. At Network , click the drop down arrow and add lan to the selection (so you have lan and wwan in that box). It should look something like this:
- This setting is a key component: It connects LAN and WAN.
- Click Save .
- You should be back in your Wireless network configuration page. Go to the bottom and click Save & Apply .
- You should now be able to connect to your internal LAN ( OpenWrt5 in my case) and access the internet from there. If not, you need to go for troubleshooting or simply try again after a reset of your device.
- If your network works as expected, you can now set some additional settings by clicking the Edit button for you LAN wifi (like your security (highly recommended), maximum transmit power or MAC filter, . )
- After you changed something, don’t forget to apply the changes. Otherwise they won’t have any effect.
- And don’t forget to set a root password for your OpenWrt system.
Настраиваем Wi-Fi на OpenWRT как WAN интерфейс
На роутере с прошивкой OpenWRT настроить Wi-Fi, как внешний (WAN) интерфейс.
Обычное представление о роутере – это когда проводок от провайдера всовываете в роутер, обычно он обозначается WAN, а дальше все устройства подключаются по проводам или использую беспроводную сеть.
В нашем случае провод провайдера отсутствует, а интернет мы будем получать по беспроводной сети.
Переходим в меню: Network > Wireless
Выбираем нужную сеть и нажимаем “Join Network”
Указываем пароль для доступа в Wi-Fi
не вдаваясь в подробности, просто сохраняемся
Применяем все проделанные изменения. Нажимаем в правом верхнем углу “unsaved changes”
Дожидаемся окончания применения настроек
Как видим, роутер по беспроводной сети получил сетевой адрес. Можно подключать устройства к портам локальной сети, главное не перепутать с WAN портом. Его мы оставили без настроек.
Это решение было придумано на скорую рука, как временное. Так как была проблемма с интернетом и единственным способом получить доступ к интернет – это точка доступа из соседнего здания.