This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
fuss:debian [2020/07/28 01:41] – [Recompile Debian Kernel] office | fuss:debian [2025/05/14 22:31] (current) – [Retrieve an Original File from the Debian Repository] office | ||
---|---|---|---|
Line 411: | Line 411: | ||
offload-tso on | offload-tso on | ||
</ | </ | ||
+ | |||
+ | ====== Disable nftables and Continue Using Legacy iptables ====== | ||
+ | |||
+ | <code bash> | ||
+ | update-alternatives --set iptables / | ||
+ | update-alternatives --set ip6tables / | ||
+ | update-alternatives --set arptables / | ||
+ | update-alternatives --set ebtables / | ||
+ | </ | ||
+ | |||
+ | ====== Fix Issues on Release Change ====== | ||
+ | |||
+ | When a repository changes its release data the following error should appear when updating packages: | ||
+ | < | ||
+ | This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details | ||
+ | </ | ||
+ | |||
+ | the solution is to run '' | ||
+ | <code bash> | ||
+ | apt-get update --allow-releaseinfo-change | ||
+ | </ | ||
+ | |||
+ | with the extra '' | ||
+ | |||
+ | ====== Ensuring HostAPd is Started Only After the Bridge Interface ====== | ||
+ | |||
+ | On Debian, bridging the wireless interface to a bridge involves using '' | ||
+ | |||
+ | In order to do this, copy ''/ | ||
+ | |||
+ | Assuming '' | ||
+ | < | ||
+ | [Unit] | ||
+ | Description=Access point and authentication server for Wi-Fi and Ethernet | ||
+ | Documentation=man: | ||
+ | BindsTo=sys-devices-virtual-net-br0.device | ||
+ | After=sys-devices-virtual-net-br0.device sys-subsystem-net-devices-wlan0.device | ||
+ | ConditionFileNotEmpty=/ | ||
+ | |||
+ | [Service] | ||
+ | Type=forking | ||
+ | PIDFile=/ | ||
+ | Restart=on-failure | ||
+ | RestartSec=2 | ||
+ | Environment=DAEMON_CONF=/ | ||
+ | EnvironmentFile=-/ | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Enabling Wireless Network Roaming using ifupdown and wpasupplicant Roaming ====== | ||
+ | |||
+ | Wireless network roaming is a mechanism through which wireless clients (computers, laptops, etc.) change their network depending on the wireless networks that are currently available. Roaming can be accomplished easily on Linux using ifupdown and plain wpasupplicant by first configuring the wireless interface and then adding networks to the wpa supplicant configuration. | ||
+ | |||
+ | For example, here are the contents of the file ''/ | ||
+ | < | ||
+ | auto wlan0 | ||
+ | allow-hotplug wlan0 | ||
+ | iface wlan0 inet manual | ||
+ | wpa-roam / | ||
+ | |||
+ | iface default inet dhcp | ||
+ | |||
+ | </ | ||
+ | |||
+ | The file defines the network interface '' | ||
+ | |||
+ | The line '' | ||
+ | |||
+ | The next part is to set up '' | ||
+ | < | ||
+ | ctrl_interface=DIR=/ | ||
+ | update_config=1 | ||
+ | country=IS | ||
+ | |||
+ | network={ | ||
+ | ssid=" | ||
+ | # | ||
+ | psk= | ||
+ | priority=1 | ||
+ | id_str=" | ||
+ | } | ||
+ | |||
+ | network={ | ||
+ | ssid=" | ||
+ | # | ||
+ | psk=... | ||
+ | priority=2 | ||
+ | id_str=" | ||
+ | } | ||
+ | |||
+ | network={ | ||
+ | ssid=" | ||
+ | # | ||
+ | psk=... | ||
+ | priority=3 | ||
+ | id_str=" | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | that defines three Wifi networks with SSIDs, '' | ||
+ | |||
+ | Note that the markers '' | ||
+ | < | ||
+ | auto wlan0 | ||
+ | allow-hotplug wlan0 | ||
+ | iface wlan0 inet manual | ||
+ | wpa-roam / | ||
+ | |||
+ | iface default inet dhcp | ||
+ | |||
+ | iface wifi_c inet manual | ||
+ | address 192.168.0.1 | ||
+ | netmask 255.255.255.0 | ||
+ | |||
+ | </ | ||
+ | where '' | ||
+ | |||
+ | ====== mod_qos & Others Undefined Symbol ====== | ||
+ | |||
+ | As rare as it may be, sometimes Debian packages are broken and the built binaries reference libraries that are not available on the current system. As an example, here is the '' | ||
+ | < | ||
+ | mod_qos.so: undefined symbol: pcre_free | ||
+ | </ | ||
+ | |||
+ | One solution is to attempt and upgrade the package to " | ||
+ | |||
+ | A better solution is [[/ | ||
+ | |||
+ | ====== Get Debian Version ====== | ||
+ | |||
+ | The following release should display the current Debian version: | ||
+ | |||
+ | <code bash> | ||
+ | lsb_release -a | ||
+ | </ | ||
+ | |||
+ | ====== Quick Way to Install All Packages from One Machine Onto the Other ====== | ||
+ | |||
+ | Using some command-line tools while logged in on '' | ||
+ | <code bash> | ||
+ | dpkg --get-selections | grep ' | ||
+ | </ | ||
+ | that will get all the installed packages from '' | ||
+ | |||
+ | The transfer is sometimes useful in situations where the same set of packages have to be used across a cluster of nodes, or some uniformity is desired across several machines, such as within a docker swarm. | ||
+ | |||
+ | ====== Retrieve an Original File from the Debian Repository ====== | ||
+ | |||
+ | The following command will create a command-line alias named '' | ||
+ | <code bash> | ||
+ | dist-file() { dpkg -S / | ||
+ | </ | ||
+ | |||
+ | In order to use the alias, just copy-paste the above line into a terminal and press return. If successful, the command will produce no output. | ||
+ | |||
+ | The alias is pretty useful for system administrators that have changed service configuration files and would like to retrieve the original file in order to compare with the local file. The alias can of course be piped into '' | ||
+ | |||
+ | For example, the following command will display that changes between the original package file at ''/ | ||
+ | <code bash> | ||
+ | dist-file / | ||
+ | </ | ||
+ | and it thus shows any local changes that have been made to the main Apache2 configuration file. | ||
+ | |||
+ | The version above picks the currently available Debian package according to distribution settings (oldstable, stable, unstable, experimental, | ||
+ | <code bash> | ||
+ | dist-file-exact() { dpkg -S $1 | awk -F':' | ||
+ | </ | ||
+ | |||
+ | However, be aware that the '' | ||
+ | |||
+ | ====== Filtering Interfaces and Protocol Version in IfUpDown Scripts ====== | ||
+ | |||
+ | IfUpDown scripts run once an interface is added, removed, but also when a given protocol link has been established such as IPv4 or IPv6 such that it is necessary to filter for both in order to ensure that a script runs once. | ||
+ | |||
+ | For example, the following script added to ''/ | ||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | |||
+ | [ " | ||
+ | [ " | ||
+ | |||
+ | brctl addif br0 usb0 | ||
+ | |||
+ | </ | ||
+ | will filter events for the addition of the '' | ||
+ | |||
+ | Iff. the interface being brought up is '' | ||
+ | |||
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.