Here’s an example of installing isc-dhcp-server in Ubuntu Server.
Continue reading “Installing and configuring isc-dhcp-server in Ubuntu”Category Archives: Linux
IPTables rules for DHCP
Assume the default server INPUT DROP, now I will give an example of a simple rule permitting DHCP requests to the server, this will be enough for clients to get IP from the server (where em1 is the network interface on which the DHCP server is running):
Continue reading “IPTables rules for DHCP”How to convert a list of IP addresses to DNS names
In Linux, you can convert a list of IP addresses into DNS names, for example, by a simple script.
To do this, create an empty file with the extension .sh, make it executable and add the content to it:
#!/bin/sh while read ip traf ; do name=`host $ip|awk '{print $NF}'` echo -e "$name\t$ip\t$traf" done >name_ip_traf.lst <ip_traf.lst
Where ip_traf.lst is a file with a list of IP addresses that need to be converted to DNS names.
You can make it executable by the command:
chmod +rwx file.sh
Run the script in the directory where it is located by the command:
./file.sh
Or run by specifying the full path:
/dir/file.sh
After the startup, you must wait for a while or interrupt the execution by pressing CTRL+C.
Network interface in Linux without IP address
To raise the network interface in Linux without an IP address, simply run the command:
Continue reading “Network interface in Linux without IP address”How to enable or disable Proxy ARP on Linux
Let’s look at the status of Proxy ARP (1 – enabled, 0 – disabled):
Continue reading “How to enable or disable Proxy ARP on Linux”Install and configure accel-ppp (IPoE) for ABillS
On the test, I’ll run accel-ppp in Ubuntu Server 16.04 LTS for ABillS.
Continue reading “Install and configure accel-ppp (IPoE) for ABillS”Ip-up and ip-down scripts with ipset for Accel-ppp
I’ll give an example of the scripts I used before, in the allowip list IP addresses were added to which the Internet is allowed, and in denyip those were redirected to the http page with information about the negative deposit.
Continue reading “Ip-up and ip-down scripts with ipset for Accel-ppp”ABillS + FreeRADIUS + Accel-PPP only issue one DNS
Once after installation ABillS + FreeRADIUS2 + Accel-PPP (ipoe) noticed that for DHCP clients receive only one DNS server.
Access-Accept from FreeRADIUS was this:
Sending Access-Accept of id 1 to 127.0.0.1 port 57481
Session-Timeout = 604800
PPPD-Downstream-Speed-Limit = 51200
Framed-IP-Netmask += 255.255.255.0
Framed-IP-Netmask += 255.255.255.0
Acct-Interim-Interval = 600
DHCP-Domain-Name-Server += 8.8.8.8
DHCP-Domain-Name-Server += 8.8.4.4
PPPD-Upstream-Speed-Limit = 51200
Framed-IP-Address = 172.20.20.20
Finished request 40.
Configuring SSH session timeout
To configure the timeout for SSH sessions, let’s see where the SSH server configuration file is located:
sudo find / -name sshd_config
Open it in any text editor, for example nano:
sudo nano /etc/ssh/sshd_config
Reason for messages “HTB: quantum of class 10001 is big. Consider r2q change”
Once on the access server, Ubuntu Server 16.04 and Accel-ppp noticed the following messages in the /var/log/kern.log file:
kernel: [365970.550498] HTB: quantum of class 10001 is big. Consider r2q change. kernel: [365970.550547] HTB: quantum of class 10A49 is big. Consider r2q change. kernel: [365979.545580] HTB: quantum of class 10001 is big. Consider r2q change. kernel: [365979.545621] HTB: quantum of class 10BD6 is big. Consider r2q change. kernel: [365995.601973] HTB: quantum of class 10001 is big. Consider r2q change. kernel: [365995.602031] HTB: quantum of class 11705 is big. Consider r2q change.
First I tried to track which interfaces are being raised at this moment:
tail -f /var/log/kern.log | grep "quantum of class 10001 is big" tail -f /var/log/accel-ppp/accel-ppp.log | grep "create interface"
Continue reading “Reason for messages “HTB: quantum of class 10001 is big. Consider r2q change””