Setting up an Archer C7 in a student accomodation

Hi everyone, I have a router/modem already provided and functionnal and I don't have a clue about it's configuration. I want to use my own router to have full control of my home network, so my Archer C7 v2 is already flashed and functionnal with the latest LEDE. However, I'm unable to have internet access through the Archer's network... How should I configure LEDE to "share" the internet access ?
I think the real issue is the identification system : I need to type login & password in order to use internet (wifi and wired). The DNS server is also local, and it has custom DNS suffix as well as IP adress mask (but it doesn't work if I set a custom DNS with the local IP).
I'm still a newbie in networking (my first time with LEDE/OpenWRT) so learning is a part of the process, don't hesitate to link long pages of the wiki if it helps :wink: !

Please explain the make/model of the device...is it Ethernet...DSL...cable?

Like a hotel captive portal?

'Local' means "plugged into the LEDE"...please clarify...of course you can't change the IP of a server unless you reconfigure the network devices that use them...

You stated this was a "student accommodation" and you also stated:

Please clearly describe what you're seeking. If you have another 'router/modem' already, the Internet seems to have been successfully "shared" before. This issue could be as simple as you have 192.168.1.0/24 on the provided router, and on the LEDE's LAN...or it could be more complex (e.g. if you're on a campus, they're checking for network jacks plugging in switches and routers).

The device is a CXR ADSL2+ Modem Router, and I couldn't manage to acess anything on it (it's probably a custom solution provided directly by a company). It's plugged through RJ11 (+ phone plug at the wall), like any router I've seen. So it's a modem and a router.
The portal seems to be like an hotel's portal, yeah. With an open wifi an a login webpage. However it appears that each flat has its own modem and local wifi.

I wanted to say local to the CXR : I can't use anything else than 172.16.0.1 as DNS (the CXR's adress) because I cannot access the login page anymore (already tested with my phone) which makes sense since the login page is tied to the access here.
I just want to have acces to internet through the LEDE's wifi & wired network, and use the CXR like a bridge (but I doubt I can configure it directly, I found it's IP adress but I couldn't manage to access a config menu). From the CXR point of view, it will be only be one device with one MAC adress (the C7) connected through ethernet. Do you see what I mean ?

Yes...questions though...

  • Once you plug in or connect a device...can you access the login page and put in your credentials?
  • If so, does that grant Internet access to any other devices connected to that router?

If you mean when I plug or connect a device on the Archer already connected to the CXR (trhought the "internet" ethernet port, no (should I try the other plugs ?). When I put CXR's IP as DNS server, windows redirects me on the right domain where the login page should be, but Firefox can't reach it. Maybe I made a mistake when trying to configure the DNS ?
If you mean when I plug something to the CXR and tries to access internet, yes I have the same ID thing going on for wired and wireless connections.

No it doesn't, I have to log in with each device (with the same log&pass everywhere, I don't know if it works with other people's...).

Hmm. Let's first make it so you can get the LEDE box online. Start from a default config if you've been monkeying with lots of the settings. Then at least we'll know where you are at. If needed log into your LEDE box and reset to default settings, see wiki: https://lede-project.org/docs/user-guide/failsafe_and_factory_reset

Next, connect the LEDE box to the modem from LEDE WAN to modem ethernet port. At this point, you might or might not need to reboot the modem followed by the LEDE box.

Now, with your computer connected to the LAN port of the LEDE box, check to see if your LEDE box has gotten an IP address and DNS server via DHCP from the modem. It should have.

You still won't have internet access, because you haven't done the captive portal thing. But at least get this far and see what you get. Post a screenshot of the interfaces page.

EDIT: after the above, you should try surfing an internet website, like google.com or lede-project.org or whatever, and you may or may not get the captive portal on your computer. If you do, and you log in, then do you surf ok? If you don't, what do you get?

This isn't possible yet with his ISP.

I don't mean the Archer. You only mentioned the CXR, and I WANT TO CONFIRM THAT YOU CAN NORMALLY PLUG IN A DEVICE.

I'm lost as to why you are changing any settings on your Windows device. I WANT TO MAKE SURE YOU CAN NORMALLY PLUG INTO THE DEVICE AND PROVIDE CRDENTIALS.

WOW! This is a BIG ISSUE...

Perform 3 tasks:

  • Remove all custom settings from the Windows devices, plug in and make a note of the link that it sends you to. (if it passes the MAC, you will have to alter this link in fruther steps)
  • Take a note of the IP, DNS and Gateway the Windows device receives BEFORE YOU ENTER THE CREDENTIALS (If this IP range is 192.168.1.0/24, you will have to renumber the LAN on the LEDE!!!) This is to see if you even need to specify a DNS server.
  • After entering the credentials, see if any of this information changes (if it doesn't, there no need to keep editing your Windows NIC settings)
  • If the domain you're browsing to doesn't exist or only exists in the ISP's DNS, you'll have to make a DNS entry on your LEDE (we'll cover that later if the following doesn't work). Hopefully, the link includes an IP address.

SO, THIS IS WHAT YOU'RE GOING TO DO:

  • Once you have the WEBLINK, you will connect the LEDE
  • plug in the Windows machine, and attempt to browse to this address
  • Enter your credentials
  • Everything connected to the LEDE should then have Internet access

I do this at hotels all the time. Hope this helps.

Yes, not possible to get out to the internet, but still possible for the LEDE box to get plugged into the modem and then do a DHCP negotiation and get itself a WAN IP and a DNS server. That's what I meant. Once we have that in place, and a screenshot, we'd know a lot more about how the network is set up. Such as for example the organization of the IP addresses and soforth.

God I hate captive portals. They are truly a terrible hack.

1 Like

I can, and it works perfectly (that's why I want to use the Archer, it's meant to be use with a computer) : but I need to enter the portal.

Sorry I meant with the Archer. I tried to mess with the LEDE interface and try to change the config myself. I didn't change anything on Windows. Everything I tried was only on LEDE's config.
Here are the screenshots.
When I plug the CXR to an ethernet port, I obtain this : https://imgur.com/KmHQOqg
When I plug the CXR the blue "internet" (still ethernet, though) port, I obtain this : https://imgur.com/HTuFPdx
I'll try what you tell me to do later, I don't have enough time right now... I'll come back to you monday.

I didn't ask for any screenshots on the Archer...I asked you to plug in the WINDOWS DEVICE...

You didn't perform any of the steps I asked.

From your picture, the LAN on the CXR is 172.16.5.200/21, so no need to edit the IPs on the LEDE. You are now here:

Basically:

  • You should have been able to get the weblink when connected to the CXR
  • You then plug in the LEDE, and connect the Windows PC to it
  • Enter the Credneitnas
  • All devices on the LEDE now have Interent

It's quite simple, no need to make it hard.

@lleachii I asked for the screenshot because I figured it was easier to just see what is shown there.

@Jilano34 Yep, it looks like your LEDE device gets a 172.16.x.x address on WAN from the modem device, which is great, because it seems like all you need to do now is plug your computer into a LAN port on the LEDE device and surf to the captive portal site and enter your credentials. LEDE should be doing NAT here so as far as the modem knows, it's just got one device connected, and I hope you won't have to do more credentials very often, it depends on the captive portal software.

1 Like

Hi, I tried that today, and I'm unable to access the portal once connected to the LEDE.
The portal is linked with the MAC adress, as I can force the login by using random MAC adress each time I connect my computer. I wonder if it's possible to achieve connection by using the same MAC adress on my PC and the LEDE, and connect the LEDE once the PC is logged (and disconnected of course). I could be possible because I don't have to log in each time I connect with the default CXR thing, but as I didn't manage to access the portal through the LEDE the issue is still the same, right ?
With the ipconfig command I obtain the same result before and after entering the credentials (https://imgur.com/tPtxqD4 if it helps somehow). It's the same if I try wired or wifi connection, I just have an IPv6 adress through wired connection.
I understand what you two are asking me to do and that's exactly what I wanted to achieve first, but unfortunately it's not simple.

Well, how is the portal linked to MAC? Is that something that is sent in the URL or POST data? Because the packets are coming from the LEDE box and using the LEDE Mac. If you can get the lede box Mac registered you should be ok. But without knowing how the portal software works it's hard to know how to do it...

My guess is you might be able to use curl from the LEDE box to provide the portal what it needs

Alright, I'm figuring out how to use the curl command now, there's a lot to read about. I assume there's no difference to test that from the ubuntu subsystem, it's easier to test here until I found what data is sent. I am also analysing the HTML source from the login page, it seems achievable even for me.
I just faced something really, really weird when I tried to change my MAC address : I just couldn't access internet with my computer anymore. I mean, I unplugged the LEDE box, changed my PC's address, connected it to the CXR, then I'm unable to log in. The webpage shows up normally, but login gives a 'not found' error. How could it be possible ? After that, I tried random adresses and it randomly gave this issue...
[EDIT] The HTML code explains everything : POST method is used, we should have everything to write a little sh script to have auto login on the LEDE.

Great, when you get it working can you post a snippet here so people with similar problems might be able to find out how to do it? Obviously they'll have to modify for their situation, but it seems useful to have an example of something that worked for someone, somewhere at least.

I couldn't manage to solve the original modem problem... Changing IP, logging with the computer doesn't work at all. It's almost like the CXR identify the LEDE box as a router and blocks it. Should I try faking the MAC adress with other devices, like logging with the computer then using the TV/phone with the same MAC ?
Do you have any other idea on how to achieve internet connection ?
I'm also trying to have the POST request right, I still think it can work but for now it's not really useful.

It's possible they are banning MAC address from tplink or other router mfg. You could try generating a random locally administered Mac or the like

https://www.hellion.org.uk/cgi-bin/randmac.pl

1 Like