Change default freeradius auth and acct port in CoovaChilli - openwrt

So I have two freeradius / radiusdesk installations on the server.
First one is old one and uses default freeradius ports: 1812/1813 for Auth/Acct.
The second one is the new once and using ports: 10001/10002 for Auth/Acct.
The issue now is that on my router, CoovaChili is always connection to the first one ( old one ) and communicating on the ports 1812/1813. I want to change it's ports. But it doesn't seems to be working. The OS is OpenWrt.
In my /etc/config/chilli i have added the following lines:
option radiusauthport 10001
option radiusacctport 10002
But is is not working. CoovaChilli still sends request to the old 1812/1813 ports. I want to know how to change that so it communicates with my defined port numbers, rather than the default ones.
Looking for the configurations to fix it.
Thanks

Looking at the OpernWRT guide at https://openwrt.org/docs/guide-user/services/captive-portal/wireless.hotspot.coova-chilli, it seems that you need to put the value parameter inside double quotes.
Specifically
option radiusauthport "10001"
option radiusacctport "10002

Related

How to set the django-channels ChannelsLiveServerTestCase server port?

I am trying to write tests with selenium and I am using ChannelsLiveServerTestCase.
I need to set the port the server listens to.
I suppose this should be a rare situation where someone needs to set the port as no one answered the question.
Anyway, I had to dig into the source code of daphne.
In testing.py file look for the line
endpoints = build_endpoint_description_strings(host=self.host, port=0)
in my case it was line 139 and change it into
endpoints = build_endpoint_description_strings(host=self.host, port=WHICHEVER_PORT_YOU_WANT)

Modem AT commands, unable to get into data mode (PPP)

I have a simcom7600 modem which I am trying out via AT commands.
I was able to use AT commands to setup the modem, and connect to an MQTT broker and exchange messages. Now I am trying to figure out how I can do something similar, but then with my own TCP/IP stack. Before diving into the deep there, I would like to confirm that I can get into data mode (PPP) which I am not able to, it seems.
I attached my modem (AT+CGATT=1), and activated it (AT+ACACT=1,1). I verified that I have a carrier/provider (AT+COPS?).
So I thought I was all set to send the ATO (online) commands. But it returns NO_CARRIER every time I try. I have no idea what I am doing wrong.
The logging that confirms above statements:
AT+COPS?
Sending command: AT+COPS?
AT+COPS?[CR][CR][LF]+COPS: 0,0,"NL KPN simyo",7[CR][LF][CR][LF]OK[CR][LF]
AT+cgatt?
Sending command: AT+cgatt?
AT+cgatt?[CR][CR][LF]+CGATT: 1[CR][LF][CR][LF]OK[CR][LF]
AT+cgact?
Sending command: AT+cgact?
AT+cgact?[CR][CR][LF]+CGACT: 1,1[CR][LF]+CGACT: 2,0[CR][LF]+CGACT: 3,0[CR][LF][CR][LF]OK[CR][LF]
ATO
Sending command: ATO
ATO[CR][CR][LF]NO CARRIER[CR][LF]
PS: the [CR][LF] stand for resp. \r and \n, I replace them before I log for ease of reading.
I obviously have to supply more info to the modem, but from this manual I can't seem to figure out which commands I miss, and how I could validate step by step that I am on the right track.
I found this nice document. I'll share it here in case somebody else struggles with this as well.
When I send the following commands:
ATZ (reset)
ATE0 (disable echo)
AT+CGREG? (check registration to PDP network)
AT+CGDCONT=1,"IP","internet" (set APN for my provider, they expect the string "internet")
ATD*99# (start data mode, aka PPP)
then I can break out and move back into PPP with the following commands:
+++ (send + character, wait for 700ms, send + character, wait for 700ms, send + character) => back to AT command mode
ATO (back to data mode)
NOTE: the APN your provider expects, is I think in all cases an easy Google. Your provider will most likely explain how to manually set your APN in case your phone won't do it automatically.

How programatically disable specific item in network connection properties?

I want to know if some API/code exists to disable a specific item in the (current) network connection properties?
If yes, could you show a working code example, explain the details, and point out some limitations (if they exist) of the technique used?
The API to disable these bindings is INetCfgBindingPath::Enable. The bindview sample illustrates how to call the API.
From Windows 8 and later, you may alternatively invoke the WMI method /root/standardcimv2/MSFT_NetAdapterBindingSettingData::Disable. Here's a line of PowerShell that illustrates how to disable the bindings from a NIC named "mb-port" to the "ms_msclient" driver (aka wkssvc):
Get-CimInstance -Namespace root/standardcimv2 -Query 'SELECT * FROM MSFT_NetAdapterBindingSettingData WHERE Name = "mb-port" AND ComponentID = "ms_msclient"' | Invoke-CimMethod -MethodName Disable
Note that the GUI is being sneaky: it merges multiple bindpaths into the same checkbox. In the example you have highlighted, there are likely 2 bindpaths from ms_msclient to the NIC: one over IPv4 and one over IPv6. The GUI disables/enables all paths when you clear/tick the checkbox. If you come in through the API and want to do the same, you'll need to enumerate all bindpaths that start from ms_msclient and go to the NIC mb-port.

Don't have access to Pureftp using Unix credentials

I've been struggling with PureFTP on my Orange Pi Zero (Armbian 5.38, ubuntu), I don't know what should I do to enter with system credentials, I have "no" on PAMAuthentication and "yes" on UnixAuthentication, I dont know why it takes me as "Anonymous" (ANONY. OFF).
I'm not using pure-ftpd.conf (That's getting me off) and I just want to leave as simple as it seems to work. I don't want to use Virtual Users, so pure-pw didn't be configured...
I think that could be by the TLS option, I'm trying to set it "pure-ftpd -Y 0" but frozen my ssh connection... Why? there are similar commands of PureFTP that do the same behavior, the temperature is okay (33ÂșC)
Thanks
Finally RESOLVED!
Forget to know what was inside auth/70pam or auth/65unix, that was my error... (contains YES or NO)
Once changed 65unix to "NO" and 70pam to "YES"
Then on conf/PAMAuthentication set to "YES", and UnixAuthentication to "NO" (Because PAMAuthentication includes a
module with Unix authentication , by default)
Finally It didn't was what I'm looking for (Because I was looking for an user with chroot only on 1 directory), so I created Pure-FTP virtual users (First create an user for Linux (ftpuser) and then you can create multiple "virtual users" through pure-pw command, simple once you understand virtual users of pureftp).
Hope it helps!

OpenWrt/network - Configuring dnsmasq for ad-blocking fails with "bad address at"

Trying to get ad blocking working in OpenWrt router firmware 10.03.1
I've prepared a file /etc/hosts.ads contain harmless entries like
address=/eviladserver1.com/127.0.0.1
address=/eviladserver2.com/127.0.0.1
in /etc/dnsmasq.conf I added the following line:
addn-hosts=/etc/hosts.ads
and restarted dnsmasq.
Now on restart I see the log being filled with error messages:
Jun 3 22:52:33 OpenWrt daemon.err dnsmasq[13056]: bad address at /etc/hosts.ads line 1
about every single line in the hosts.ads
I googled it but with no luck. Everything seems right syntax-wise, why the dnsmasq does not like it?
(all lines in hosts.ads end with [LF] only)
Appropriate format for /etc/hosts.ads is a standard HOSTS format such as:
127.0.0.1 eviladserver1.com
127.0.0.1 eviladserver2.com
Look at my implementation of adblock for OpenWRT at http://jazz.tvtom.pl/adblock-w-openwrt/ (polish).
Per the dnsmasq documentation, addn-hosts= specifies additional addresses in /etc/hosts format. It looks like you're trying to add an additional dnsmasq configuration file instead. For that, you want conf-file= to specify the file directly, or you want to put the file in a directory specified by conf-dir=.

Resources