This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Give an IP address in the range of the camera to the eth0 interface | |
sudo ip address add 192.168.1.133/24 dev eth0 | |
#First, scan the eth0 interface to find all the IPs connected to it | |
nmap -e eth0 192.168.1.0/24 | |
#Now that you found the camera's IP, scan which ports are open to find the HTTP port (suupose the IP is ...189) | |
nmap -e eth0 192.168.1.104 -p 0-65535 | |
#SSH and foward the HTTP port of the discovered camera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For copy/paste to work: | |
sudo apt-get install -y spice-vdagent | |
#Restart and it should work. If not, try launching it, or activating the service: | |
spice-vdagent | |
spice-vdagentd | |
#Reboot, then do | |
ps -e | grep spice | |
#You should see both running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install socat on host and vm | |
#on virtual machine: | |
#socat tcp-listen:5037,bind=localhost,reuseaddr,fork tcp:192.168.122.1:5037 | |
#automatic installation on startup: | |
echo -e '#!/bin/bash\nsocat tcp-listen:5037,bind=localhost,reuseaddr,fork tcp:192.168.122.1:5037 &' | sudo tee --append /etc/rc.local && sudo chmod 755 /etc/rc.local | |
#on host machine, use with ./script.sh 99 for example | |
socat tcp-listen:5037,bind=192.168.122.1,reuseaddr,fork tcp:localhost:5037 & socat tcp-listen:19000,bind=localhost,reuseaddr,fork tcp:192.168.122.$1:19000 & | |
#Then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#On host machine | |
iptables -F | |
iptables -F -t nat | |
echo 1 >| /proc/sys/net/ipv4/ip_forward | |
iptables -t nat -A PREROUTING -p tcp -d 192.168.122.1 --dport 5037 -j DNAT --to localhost:5037 | |
iptables -t nat -A PREROUTING -p tcp -d localhost --dport 19000 -j DNAT --to 192.168.122.99:19000 | |
iptables -t nat -A POSTROUTING -j MASQUERADE | |
#On virtual machine | |
iptables -F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ufw --force reset | |
sudo ufw default deny incoming # Use the VPN tunnel for all traffic | |
sudo ufw default deny outgoing | |
sudo ufw allow out on tun0 | |
sudo ufw allow in on tun0 | |
sudo ufw allow out 1194/udp # e.g. 1234/udp, depending on your OpenVPN client config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOSTNAME=dynamichost.domain.com | |
LOGFILE=$HOME/ufw$HOSTNAME.log | |
Current_IP=$(host $HOSTNAME | head -n1 | cut -f4 -d ' ') | |
if [ ! -f $LOGFILE ]; then | |
/usr/sbin/ufw allow from $Current_IP to any port 22 proto tcp | |
/usr/sbin/ufw allow from any to $Current_IP port 22 proto tcp | |
echo $Current_IP > $LOGFILE | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drivers/nvme/host/nvme.h | 5 +++++ | |
drivers/nvme/host/pci.c | 10 ++++++++++ | |
2 files changed, 15 insertions(+) | |
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h | |
index 8e4550fa08f8..e970423b7944 100644 | |
--- a/drivers/nvme/host/nvme.h | |
+++ b/drivers/nvme/host/nvme.h | |
@@ -83,6 +83,11 @@ enum nvme_quirks { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drivers/pci/pcie/aspm.c | 14 ++++++++++---- | |
drivers/pci/quirks.c | 9 ++++++++- | |
include/linux/pci-aspm.h | 1 + | |
3 files changed, 19 insertions(+), 5 deletions(-) | |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c | |
index 3b9b4d50cd98..9434382d26dc 100644 | |
--- a/drivers/pci/pcie/aspm.c | |
+++ b/drivers/pci/pcie/aspm.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install dpkg-dev | |
#https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list | |
sudo apt-get build-dep gawk | |
sudo nano /etc/apt/sources.list | |
deb-src http://security.ubuntu.com/ubuntu bionic-security main | |
sudo apt-get source linux-souce... | |
apt-get source linux #why this works?? | |
sudo apt-get build-dep linux-image-$(uname -r) | |
tar -xzvf archive.tar.gz | |
cd kernel_source_directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/parisc/include/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/nios2/include/uapi/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/nios2/include/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/c6x/include/uapi/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/c6x/include/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linux-4.15/debian/linux-headers-4.15.0-23/usr/src/linux-headers-4.15.0-23/arch/openrisc/include/uapi/asm/Kbuild not created: newer or same age version exists | |
cpio: /home/vm/linu |