User contributions for Alex
From AcrodusWiki
18 November 2024
- 21:2821:28, 18 November 2024 diff hist +13 Enable KVM guest console through virsh No edit summary
- 21:2721:27, 18 November 2024 diff hist +1,990 N Enable KVM guest console through virsh Created page with "Using the virsh console [vm_name] command can be used to get a shell to the vm. This is very handy when there is no virt-manager/desktop environment or no ssh. Although you will need to get a shell up somehow. This assumes that the configuration in the xml is correct with <serial> and <console> sections. sudo systemctl status serial-getty@ttyS0 If this is not active. sudo systemctl enable serial-getty-ttyS0 and sudo systemctl start serial-getty-ttyS0 When creating..."
- 16:0316:03, 18 November 2024 diff hist +10 Bring up wireguard interface with wg script No edit summary current
- 16:0316:03, 18 November 2024 diff hist +15 Bring up wireguard interface with wg script No edit summary
- 16:0216:02, 18 November 2024 diff hist −2 Bring up wireguard interface with wg script No edit summary
- 16:0216:02, 18 November 2024 diff hist −1 Bring up wireguard interface with wg script No edit summary
- 16:0116:01, 18 November 2024 diff hist −3 Bring up wireguard interface with wg script No edit summary
- 16:0016:00, 18 November 2024 diff hist +5 Bring up wireguard interface with wg script No edit summary
- 15:5915:59, 18 November 2024 diff hist +1 Bring up wireguard interface with wg script No edit summary
- 15:5715:57, 18 November 2024 diff hist +893 N Bring up wireguard interface with wg script Created page with "This is the example script and associated config file for the vpn client. This was connecting to a vpn server hosted on the home network. wg_acrodus_up.sh #!/bin/bash ip l add dev wg0 type wireguard wg setconf wg0 wg_acrodus.conf ip a add 10.0.0.2/32 dev wg0 ip l set dev wg0 up wg set wg0 fwmark 51821 ip -4 rule add not fwmark 51821 table 51821 ip -4 route add 0.0.0.0/0 dev wg0 table 51821 ip -6 rule add not fwmark 51821 table 51821 ip -6 route add ::/0 dev wg0 tab..."
8 November 2024
- 09:5409:54, 8 November 2024 diff hist +702 N Mount samba file share on linux machine Created page with "Use the following commands to mount a samba file share onto a local linux machine sudo mount -t cifs //samba.acrodus.uk/sharing /media/alex/smb -o username=alex Notes- cifs stands for common internet file system and is a protocol that is a subset of smb (server message block). -o option allows to specify parameters for the authentication, this can be a seperate file if required, example below username=target_user_name password=target_user_password domain=domain The..."
28 October 2024
- 21:3121:31, 28 October 2024 diff hist +722 N Debian online package repositry Created page with "Add these to /etc/apt/sources.list to be able to download packages from online repositry. deb http://deb.debian.org/debian/ bookworm main non-free-firmware deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware deb http://security.debian.org/debian-security bookworm-security main non-free-firmware deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware # bookworm-updates, to get updates before a point release is made..."
- 20:5420:54, 28 October 2024 diff hist +736 N Wg-quick actual commands Created page with "This is a reference to what commands are part of the wg-quick command. This is useful when manually setting up a wireguard vpn. Consideration should be given to the ip rule commands, which effectively determine what routing table packets that are encrypted or not use. $ sudo wg-quick up wg0 [#] ip link add wg0 type wireguard [#] wg setconf wg0 /dev/fd/63 [#] ip -4 address add 10.90.90.2/24 dev wg0 [#] ip link set mtu 1420 up dev wg0 [#] wg set wg0 fwmark 1234 [#] ip -4..." current
- 15:0915:09, 28 October 2024 diff hist +215 N Linux Machine create ssh key pair for ssh authentication Created page with "This is very simple, use the one line command ssh-keygen -t rsa Just ensure you check where it is going to store the file. Follow the guide on copying the public key to an ssh server to set up ssh authentication." current
26 October 2024
- 14:4914:49, 26 October 2024 diff hist +399 N Set up VLAN interface on Linux Machine Created page with "This guide gives you commands to quickly set up a vlan tagged interface one a linux machine. $ sudo ip link add link enp0s3 name enp0s3.100 type vlan id 100 $ sudo ip addr add 192.168.0.200/24 dev enp0s3.100 $ sudo ip link set up enp0s3.100 Ensure that the link is up, in doing so the operating system will add the route into the routing table. This however can be confirmed with the ip r command." current
18 October 2024
- 18:0418:04, 18 October 2024 diff hist +742 N Set up Linux machine as dhcp server Created page with "This is a quick note on how to setup a linux machine to be a dhcp server. This is likely to be on the same machine configured as the router but does not have to be. The package to install in dhcp-isc-server. Configuration can be found in /etc/dhcp/dhcpd.conf Example below configured on home network however default examples are commented out in the conf file. subnet 192.168.40.0 netmask 255.255.255.0 { option routers 192.168.40.1; option subnet-mask 255.255.255.0;..." current
- 07:3207:32, 18 October 2024 diff hist +161 N Terminal based web browser Created page with "A few options for terminal based web browser. Links2, Lynx, w3m, browsh. Links2 was the preferred for no desktop environment terminal. sudo apt install links2" current
- 07:0607:06, 18 October 2024 diff hist +922 N Configure Linux Machine with wireless config Created page with "How to add persistent configuration in /etc/network/interfaces to connect to wireless access point. Just edit /etc/network/interfaces and write: auto wlan0 iface wlan0 inet dhcp wpa-ssid {ssid} wpa-psk {password} A good tool to have installed is the iw command. Run the command 'iw dev' to show the wireless adapter information. ##### To have a non persistent configuration use the following commands. //This creates a configuration fi..." current
- 06:4906:49, 18 October 2024 diff hist +229 N Show contents of file in Cisco IOS command line Created page with "This is the equivalent to using the cat command in a Linux shell. Use the command 'more' with the path to the file. For example 'more flash:config.text' with print the contents of config.text stored on the local on board flash." current
13 October 2024
- 17:3817:38, 13 October 2024 diff hist +422 N Change udp socket buffer size on Linux Machine Created page with "This changes the default socket buffer size within the kernel. Use the below commands to view the current settings. $ sysctl net.core.rmem_default net.core.rmem_default = 212992 $ sysctl net.core.rmem_max net.core.rmem_max = 212992 Use the below commands to edit the settings. $ sudo sysctl -w net.core.rmem_default=10000 net.core.rmem_default = 10000 sudo sysctl -w net.core.rmem_max=800000 net.core.rmem_max = 800000" current
7 October 2024
- 20:5020:50, 7 October 2024 diff hist +251 N OID of Linux SNMp agent extend Created page with "A note on how linux and snmpd creates its OID. It always starts with 1.3.6.1.4.1.8072.1.3.2.3.1.1.4 and then the remaining numbers are the ascii representation of the extend name. The second field entered when configuring the extend in the snmpd.conf" current
6 October 2024
- 21:3421:34, 6 October 2024 diff hist +724 N Create systemd service on Linux machine Created page with "This is a note on how to create a systemd service based on a c program. This was created after implementing the genisys echo detection program as a systemd service. The first thing is to make a Unit file. An example is shown below. [Unit] Description=Detect genisys echo. After=network.target [Install] WantedBy=multi-user.target [Service] Type=simple ExecStart=/home/alex/Programs/echo_detection/echo_detection WorkingDirectory=/ Restart=always RestartSec=5 StandardOut=sy..." current
- 20:2520:25, 6 October 2024 diff hist +1,293 N Extend snmp agent functionality on Linux machine Created page with "This guide is to help extend the functionality of an snmp agent on a Linux machine. This allows for custom OID's to be queried from an snmp master to the agent. This also be subject to a program or script running and returning the value. Ensure that snmpd is installed. sudo apt-get install snmpd. First thing is to make some changes to the SNMP agent. In /etc/snmp/snmpd.conf ensure that the line "rocommunity public default -V systemonly" has the -V systemonly removed. T..." current
1 October 2024
- 20:3420:34, 1 October 2024 diff hist +46 Copy .iso file to usb to boot No edit summary current
- 20:3320:33, 1 October 2024 diff hist −1 Copy .iso file to usb to boot No edit summary
- 20:1420:14, 1 October 2024 diff hist +158 N Copy .iso file to usb to boot Created page with "This can easily be done with a one line command in the linux terminal as seen below: : dd bs=4M if=/path/to/file.iso of=/dev/sdbx status=progress oflag=sync"
- 19:4919:49, 1 October 2024 diff hist +331 N File too large for filesystem Created page with "This note was created after an issue occurred trying to transfer a 5GB iso to a usb stick. The usb stick had a single 8GB partition with an fat32 filesystem. This error occurred because the maximum filesize of a file on a fat32 filesize is 4GB. It should also be noted that ext filesystems are not compatible with windows machines." current
- 16:4716:47, 1 October 2024 diff hist +345 N Create filesystem on partition using mkfs on Linux machine Created page with "This guide has presumed there is already a partition/s created on the disk. This will cover configuring a filesystem on a partition using the mkfs command. To create the filesystem use the command: : sudo mkfs.vfat /dev/sdb1 (using a fat32 fs on disk sdb first partition) Use the mount command to mount the filesystem if not already done so." current
- 16:4216:42, 1 October 2024 diff hist +1,145 N Create partition using parted utility on Linux machine Created page with "Parted is a tool/utility used by linux machines to manipulate partitions on a block device. To list currently attached disk volumes use the command: : sudo parted -l To select the disk to partition use the command: : sudo parted sdx (x being the disk you want to format, stay away from the disk that has the bootloader and rootfilesystem on) You will now be in the parted shell. Create a partition table with the command: : (parted) mklabel gpt/msdos Make sure it..." current
30 September 2024
- 16:5416:54, 30 September 2024 diff hist +526 N Linux Machine copy public key to ssh server Created page with "One line command to copy ssh public to ssh server to allow for ssh pub priv key authentication. ssh-copy-id -i ~/.ssh/id_rsa.pub alex@git.acrodus.uk ssh-copy-id : command -i : option to specify the file with the public key user:host : in this case this was for setting up git server which uses ssh ensure that when attempting to use ssh to connect to server that the default is using the private key for the public key you sent. This can be configured in /etc/ssh.conf or..." current
- 14:1614:16, 30 September 2024 diff hist 0 Compiling kernel module results in ERROR No edit summary current
- 14:1514:15, 30 September 2024 diff hist 0 Compiling kernel module results in ERROR No edit summary
- 14:1414:14, 30 September 2024 diff hist +1,330 N Compiling kernel module results in ERROR Created page with "This issue was present when compiling a linux device driver using make on a raspberry pi zero w 2. The below log was printed: make -C /lib/modules/6.6.31+rpt-rpi-v8/build M=/home/alex/Linux_I2C_LCD_driver2.0 modules make[1]: Entering directory '/usr/src/linux-headers-6.6.31+rpt-rpi-v8' ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fi..."
23 September 2024
- 12:3712:37, 23 September 2024 diff hist +194 Set up SNAT for Private network internet access No edit summary current
- 12:3112:31, 23 September 2024 diff hist +1,043 N Set up SNAT for Private network internet access Created page with "This is to set up a Linux machine to provide routing and SNAT of private network to the internet. This command provides configure the machine using iptables. iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE This command can be explained in the following way: iptables: the command line utility for configuring the kernel -t nat select table "nat" for configuration of NAT rules. -A POSTROUTING Append a rule to the POSTROUTING chain (-A stands for "append"). -o..."
- 11:4911:49, 23 September 2024 diff hist +151 N Disable ssh server for password authentication Created page with "PasswordAuthentication no Match address 192.168.0.0/16 PasswordAuthentication yes Disables password authetication for sshd except for private range." current
- 11:4711:47, 23 September 2024 diff hist +115 N Quick Command to find structure definition in header files Created page with "find . -type f -name "*.h" -exec grep 'struct tvbuff' {} /dev/null \; /dev/null is to produced file name as output" current
10 September 2024
- 10:4910:49, 10 September 2024 diff hist +1,004 N Create new user on Embedded Linux without useradd tools Created page with "This is used on Linux systems without utilities such as useradd. This guide was written when configuring a Beaglebone Black after linux installation using buildroot. First go to /etc/passwd. Edit this file with vi. Example line to add 'alex:x:1010:1010:,:/home/alex:/bin.bash username:alex passwd:x meaning stored in /etc/shadow user id:1010 group id:1010 additional text field: seperate by commas, nothing added in this example shell prompt:bash #Ensure user id is uniqu..." current
3 September 2024
- 08:5808:58, 3 September 2024 diff hist −4 Set up Linux machine as wireless access point No edit summary current
- 08:5808:58, 3 September 2024 diff hist +1,556 N Set up Linux machine as wireless access point Created page with "How to configure a linux machine to operate as a wireless access point. Ensure that the hostapd package is installed on the machine, to install apt-get install hostapd. Go to the file /etc/default/hostapd and edit the line DAEMON_CONF="" with the path to the hostapd.conf file. This is advised to be put at /etc/hostapd/hostapd.conf, this file may need to be created on first use. The config file needs to include the contents shown below, obviously changed for specific u..."
30 August 2024
- 09:3509:35, 30 August 2024 diff hist −2 FFMPEG shell command to stream from RTSP and write to framebuffer No edit summary current Tag: Manual revert
- 09:3409:34, 30 August 2024 diff hist +2 FFMPEG shell command to stream from RTSP and write to framebuffer No edit summary Tag: Reverted
- 09:3309:33, 30 August 2024 diff hist −14 FFMPEG shell command to stream from RTSP and write to framebuffer No edit summary
- 09:3209:32, 30 August 2024 diff hist +1,776 N FFMPEG shell command to stream from RTSP and write to framebuffer Created page with "This was required for connecting to a CCTV camera supporting RTSP. #! /bin/bash ffmpeg -rtsp_transport tcp -i rtsp://admin:'NumptyHead1!'@192.168.1.64/streaming/channels/101 -i red_circle.png -i blue_circle.png -i green_circle.png -i yellow_circle.png \ -tune zerolatency\ -preset ultrafast\ -filter_complex "[0][1] overlay=x='if((mod(floor(n/10),4)*mod(floor(n/10)+1,4)),640,650)':y='if((mod(floor(n/10)+2,4)*mod(floor(n/10)+1,4)),10,0)'[v1];..."
- 09:2409:24, 30 August 2024 diff hist +580 N Cisco OID's for Optical Receive Power Created page with "Ensure snmp is installed. If not, install the package snmp. Run the command snmpwalk -v2c -c public [ip address]. This will return a list of OID's, filter for the string of the value you are after (ie. Gi1/1 Transmit power). Take the last number from the OID and run the command snmpget -v2c -c public [ip address] 1.3.6.1.4.1.9.9.91.1.1.1.1.4.[last number]. This will return the current value. This has only been tested for a limited number of OID's. #NOTE Ensure SNMP age..." current
15 July 2024
- 10:4610:46, 15 July 2024 diff hist +301 N Enable IP forwarding on Linux Machine Created page with "==Introduction== This guide shows how to enable ip forwarding on a Linux Machine running Debian 12 for both Ipv4 and Ipv6. ==HOW TO== Go to the file /etc/sysctl.conf. Edit the lines net.ipv4.ip_forward=0 to net.ipv4.ip_forward=1 and net.ipv6.conf.all.forwarding=0 to net.ipv6.conf.all.forwarding=1." current
- 10:3410:34, 15 July 2024 diff hist +1,431 N Configuring DNS nameservers on Linux Machine Created page with "==Introduction== This guide explains the process of configuring dns nameserver for Linux machines running Debian 12. There are several daemons/services which manage the resolv.conf file. The resolv.conf file is where a list of nameserver IP's are kept. This file can be edited manually however will can be overwritten by a service that is supposed to manage the file on our behalf. This guide assumes that network manager is disabled, as this is preferred with Debian server..." current
12 July 2024
- 13:2813:28, 12 July 2024 diff hist −3 Setting up TFTP server on Linux machine →Example
- 13:2813:28, 12 July 2024 diff hist +1 Setting up TFTP server on Linux machine →Example
- 13:2813:28, 12 July 2024 diff hist +1,199 N Setting up TFTP server on Linux machine Created page with "==Introduction== This guide explains how to set up and configure a tftp server on a linux machine using the tftpd-hpa package. ==HOW TO== ===Set up=== Ensure tftpd-hpa has been installed on the machine. This can be checked by running 'sudo apt install tftpd-hpa'. Ensure the service is active and enabled with the command 'sudo systemctl status tftpd-hpa'. To start the service run the command 'sudo systemctl start tftpd-hpa', this is not required if the service is alre..."