wifi ubuntu settings

Ubuntu allow a normal user to edit WiFi Connection

When a normal user edit Wi-Fi connection on Wi-Fi Settings, they will be asked to enter administrator user pasword.

wifi ubuntu settings

To allow a normal user to modify network connection, you can edit the connection configuration file in folder

This file look like

Find

Replace with

USER_NAME_HEARE = replace this with actual username, that need to edit the network configuration.

Change Linux user shell

To change shell for a user, run

Example

I will add a user, if no shell specified, it use sh as shell.

You can find what shell you are using now with command

CentOS add IP Address

To add IP address on a Linux server, first find name of your network interface. This can be done with command

In most case, it can be enp3s0 or eth0, if you have more than one network card, this may be differnt, in such case, you need to identify which network interface you need to configure the the IP address .

Now create file

Here i used enp3s0 as network inferface name, replace it with whatever network interface name you use.

Add following content

IP_ADDR_HERE = replace with the IP address you need to add.

enp3s0 = replace with actual network interface name.

Restart network service with command

If you need to add another IP, create file with name

for example “enp3s0:2”, you need to use same alias name in DEVICE entry (first line) in the file.

Adding IP Range in CentOS 6

gonit golang replacement for monit

gonit is a replacent for monitoring software monit. monit was removed from Debian 10 due to security issues and the devloper will not provide a patch for the security vlunerabilty in time for Debian 10 release.

You can download gonit from

https://github.com/bitnami/gonit

NetLink ONU HG323RGW

FTTH ONU HG323RGW with BSNL

I was using NetLink ONU with one antenna, it worked perfectly fine. I always get good speed. One day this ONT stopped working, so i had to nety new ONT. Internet provided given me a model with 2 antenna – NetLink HG323RGW.

NetLink ONU HG323RGW

I was very happy to have this new ONT as it have 2 LAN ports. But it didn’t last long. I started facing problems like slow speed and disconnection. On old ONT, i used to get 120 Mbps speed on speedtest. New device give me approx 90 Mbps on speedtest. Another serious problem i was was whenever i do a speedtest on speedtest.net, the ONT stopped working with RED light.

Net provider replaced the ONT with a new one, this new device also had same issues. They take the ONT and did some frimware update, that fixed problem with speed. But ONT still get rebooted on speedtest.

Some days back, this ONT died again, this time, TX power was not showing, normally it shows something like 2 dBm. Since the ONT was in warrenty period, i get a new device, but i started facing all the problems again. I was like this device is fauty and was looking to buy another ONT.

I was thinking of buying

https://www.crtindia.com/shop/gpon-ont/gpon-ont-2ge1potsac-wifi/netlink-gpon-ont-2ge1potsac-wifi-hg323dac/

After speding some time reading the specification of this router and currrent router, i noriced one thing. My old ONT says “1GE+1FE+1POTS+WIFI ONU”. I did some search and found out this router have only 1 Gbps LAN port (1GE), other one is 100 Mbps (1FE). So i switched the LAN cable to other port. That fixed speed issue, i started getting 120 Mbps on speedtest again.

I stil faced frequent disconnects and ONT turning off during speedtest. I sent a mail to [email protected] asking if i face similar issue if i buy the newer ONT model listed on their site. They offerd to check my ONT over TeamViewer.

They connected to my computer, changed value of MTU to 1460, that fixed problem with ONT getting restarted on speedtest.

After this fix, i had frequent disconnects, but NetLink support said it can be due to problem with Cable operator having some loop, this can happen if there is a MAC conflict in the network. Anyway this disconnect issue get resolved by itself after some time.

To find correct MTU value for your network, you can use ping command. On Ubuntu, i run

Start with higher value, lower it gradually until you get ping response.

In my cause value of 1433 resuted in error “ping: local error: Message too long, mtu=1460”. When i used 1432, i get ping response. You need to add 28 to this number to get actual MTU value.

1432 + 28 = 1460

On Windows, you can use ping with differnt options, see

https://kb.netgear.com/19863/Ping-Test-to-determine-Optimal-MTU-Size-on-Router

You can also contact your ISP (BNSL in my case) to get correct MTU value.

This device is manufactured by

https://www.vsolcn.com/1ge-1fe-1pots-wifi-onu-hg323rw-p00134p1.html

Sold in india by

https://www.crtindia.com/shop/gpon-ont/gpon-ont-1geife1potswifi/gpon-ont-onu-telephone-internet/

Update 2019-08-05; Everything was working better for 1 day. Today this ONT stopped working again. When i start the device, Power and Loss (RED) light turns on. Don’t get any IP on my network interface. Connecting/disconnecting the FTTH cable don’t make any differnce. Pressing reset button on the ONT did nothing. Cable operator replaced the device with another model HG2801RGW. Since i need 2 LAN ports, i purchased a 5 port Switch TP-Link TL-SG1005D 5-Port Gigabit Ethernet Unmanaged Desktop Switch (Black) from Amazon. The plan is to keep ONT simple. This way i can isolate problems easily. I have a TP-LINK Wifi Router, so don’t really need WiFi on ONT. In future, i can use simple ONT device like 1GE Secure ONU V2801S

WordPress Avada theme icon missing

WordPress Avada theme load fontawesome from old site

I have migrated a web site using Avada WordPress theme.

Once site is migrated, i edited wp-config.php file and added following to avoid site getting redirected to old website url.

Now site works, but some of the resources are loaded from OLD site url, this breaks some of the icons.

WordPress Avada theme icon missing

On Browser Developer tool console, it show following errors

Using URL replacement plugins like Better Search Replace or Velvet Blues Update URLs did not fix the problem.

To fix the it, login to wp-admin. Click on “Avada” on left menu, select Theme Options

wp-admin > Avada > Theme Options > Import/Export

Under Export Options, click on “Download Data File”, this will ask you to save theme configuration file as a .json file, for me it saved fusion_options_backup_02-08-2019.json.

Next click on “Import Contents from File” button. It will show a text area, paste content of the json file you downloaded in previous step here and click “Import”. This will fix the problem related to fonts loading from old url.

nginx password protect

Nginx Password Protect a website

nginx password protect

To password protect a web site, you need to install htpasswd utility. On Ubuntu/Debian, you can install it with command

Now create a password file with command

It will ask for password.

Edit configuration file for your web site and add following in the server entry for the web site.

Restart Nginx.

Now on visiting the web site, you will be asked to enter username and password.

See Nginx