User contributions for Alex
From AcrodusWiki
29 November 2024
- 15:5915:59, 29 November 2024 diff hist +208 N Create KVM guest with .iso installer attached as cdrom fro package repositry Created page with "When installing via the terminal with virt-install ensure that the disk option has the --type=cdrom added to it. <pre> --disk /home/alex/jigdo/debian-12.5.0-amd64-STICK16GB-1.iso,device=cdrom </pre>"
- 15:2915:29, 29 November 2024 diff hist +109 N Error opening .iso when using virt-install to create new kvm guest Created page with "Edit the /etc/libvirt/qemu.conf to include the following two lines <pre> user = "root" group = "root" </pre>" current
- 14:3614:36, 29 November 2024 diff hist +49 N Add user to sudo group command Linux machine Created page with "<pre> sudo usermod -aG sudo [name-of-user] </pre>" current
28 November 2024
- 09:4509:45, 28 November 2024 diff hist +484 N Compress directory into tarball on Linux machine Created page with "This is the command, and more importantly the options for compressing a directory or folder into a tarball on linux. <pre> tar -czvf filename.tar.gz /path/to/directory </pre> Ensure that you create the tarball with touch first. Also to unzip use the command and options. <pre> tar -xvf /path/to/tarball </pre> -x : extract -v : give more info -f : filename you can also use the -C to specify output directory <pre> tar -xvf /path/to/tarball.tar/.gz -C /path/to/directo..." current
27 November 2024
- 09:3409:34, 27 November 2024 diff hist +387 N Mount local debian iso as cdrom repositry Created page with "Command to mount the .iso as a cdrom <pre> sudo mount -o loop /path/to/.iso /media/cdrom </pre> Must add the repository using the apt-cdrom add command, should look similar to the below in sources.list <pre> deb [trusted=yes] cdrom:[Debian GNU/Linux 12.5.0 _Bookworm_ = Official amd64 STICK16GB Binary-1 with frimaware 20240210=11:28]/ bookworm contrib main non-free-firmwasre </pre>" current
25 November 2024
- 22:2422:24, 25 November 2024 diff hist +313 N Configure DNAT on Linux machine with iptables - current
- 21:1921:19, 25 November 2024 diff hist +131 N Set LXC container to autostart Created page with "Find the config file for the container. This will be in /var/lib/lxc/{container_name}/config And add the line: lxc.start.auto =1" current
23 November 2024
- 15:2415:24, 23 November 2024 diff hist −2 Use systemd to mount CIFS drive No edit summary current
- 15:2415:24, 23 November 2024 diff hist +178 Use systemd to mount CIFS drive No edit summary
- 10:5810:58, 23 November 2024 diff hist +39 Mount samba file share on linux machine No edit summary current
22 November 2024
- 14:5514:55, 22 November 2024 diff hist +148 N Create LXC container from debian image Created page with "Use the below command to create a new container from a debian image. <pre> sudo lxc-create -n webserver --template download -- --dist debian </pre>" current
- 14:3914:39, 22 November 2024 diff hist +141 N Change user default shell on Linux machine Created page with "Enter the following command to change user shell. The example changes the user alex to use bash. <pre> usermod --shell /bin/bash alex </pre>" current
- 11:4211:42, 22 November 2024 diff hist +12 Debian online package repositry No edit summary current
21 November 2024
- 09:5909:59, 21 November 2024 diff hist +306 N How to show namespaces of different running processes on Linux machine Created page with "This command shows the associated namespaces with deifferent processes running on the machine. <pre> sudo lsns </pre> Run man lsns for more information Also, to show detailed infromation of network interface namespaces run the command <pre> sudo ip netns </pre> Run man ip netns for more information." current
- 08:2308:23, 21 November 2024 diff hist +461 N Use systemd to mount CIFS drive Created page with "This two examples of unit files that enable a systemd service to mount a cifs drive. <pre> [Unit] Description=cifs mount script Requires=network-online.target After=network-online.service [Mount] What=//10.68.64.19/Reports/NMS Where=/mnt/nas Options=domain=ewr,username=nms,password=Atkins123! Type=cifs [Install] WantedBy=multi-user.target </pre> <pre> [Unit] Description=Automount NAS [Automount] Where=/mnt/nas [Install] 23WantedBy=multi-user.target </pre>"
18 November 2024
- 21:2821:28, 18 November 2024 diff hist 0 Enable KVM guest console through virsh No edit summary current
- 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
- 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