Showing posts with label network administration. Show all posts
Showing posts with label network administration. Show all posts

2021/03/30

How to prevent web admin session expiration on routers (Huawei at least)

Note: this post is just a  public draft.

1)  open Firefox

2) visit your router's administration web page. 

3) Open debugger. 

4) Log in

5) on the Network tab, right click on the first entry (usually index.php or whatever) and under "Copy" select "Copy as cURL"

6) open konsole or whatever terminal you preffer

7) write watch -n 30 and a double quote, then paste and add -k -o /dev/null and close the double quotes

8) hit enter to run watch and go back to your browser.

leave your web admin tab open, otherwise you will have to repeat all the steps.


this trick might be useful on every site that makes your session expire via ajax calls.


2020/12/05

Script to reconnect wan via rc.inet1

My router is a Linux PC with 2 lan boards, one for local lan and the other directly connected to the ISP router (configured as bridge). Each time my ISP disconnects me for whatever reason I had to either reboot the computer or keep running rc.inet1 restart until the connection is made.

So, even if it doesn't happen often, at one point I got bored of it and decided to write an script to force the reconnection as soon as possible:

 #!/bin/bash
while true ; do
   clear
   ./rc.inet1 restart
   ping google.com -c 1
   if [ $? == 0 ]; then
      exit
   fi;
   sleep 30
done

 

2018/08/02

network bonding on slackware 14.2

perhaps a first sloppy attempt I made to make bonding work in 14.2, based on this info

https://docs.slackware.com/howtos:misc:network_interace_bonding

inside /etc/rc.d/rc.M add (before rc.local section):

if [ -x /etc/rc.d/rc.bond ]; then
  . /etc/rc.d/rc.bond
fi



/etc/rc.d/rc.bond :
modprobe bonding

ip addr add 192.168.111.3/24 dev bond0
ip link set bond0 up


ip link set eth0 master bond0
ip link set eth1 master bond0

ifconfig eth0 up
ifconfig eth1 up

ip route add default via 192.168.111.13 dev bond0
chmod +x rc.bond and reboot

2018/04/24

new install to-do list

this post is a work in progress:

after installing slackware, things to do besides the normal setup like configuring network card:

copy ssh keys from old install
copy /etc/sshd config?
copy .bashrc from old home install or the entire home directory
user groups review? (seems like its no longer needed under Slackware 14.2)
xorgsetup ? only if needed
compat32
libreoffice ?
wine?
firefox 40 (yes I stick to this version until Firefox can fix newer versions problems).


kde: fix nasty konsole prompt, edit Shell: /bin/bash -l


2016/10/18

MongoDB 3.2 on Slackware 14.0

Slackbuilds already have premade packages for MongoDB but the problem is, sometimes they are outdated. Some people might not want to upgrade their Slackware installation, and since I'm in such situation, here is my recipe

  1. grab the aproppiate MongoDB from Slackbuilds to your version of Slackware. 
  2. install it as usual with upgradepkg --install-new, but dont start it now
  3. grab binaries from https://www.mongodb.com/download-center
  4. unpack them
  5. overwrite unpacked binaries in /usr/bin
  6. and now you can start the server and restart Apache if needed