Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
## save existing rules
sudo iptables-save > ~/iptables-rules
## modify rules, remove drop and reject lines
grep -v "DROP" iptables-rules > tmpfile && mv tmpfile iptables-rules-mod
grep -v "REJECT" iptables-rules-mod > tmpfile && mv tmpfile iptables-rules-mod
## apply the modifications
sudo iptables-restore < ~/iptables-rules-mod
## check
@kindejak
kindejak / k8sWorker.sh
Last active November 16, 2023 18:32
Lab 2.2. Deploy a New Cluster - fix for arm64.
#!/bin/bash
################# LFD459:1.25.1 s_02/k8sWorker.sh ################
# The code herein is: Copyright the Linux Foundation, 2022
#
# This Copyright is retained for the purpose of protecting free
# redistribution of source.
#
# URL: https://training.linuxfoundation.org
# email: info@linuxfoundation.org
#
@kindejak
kindejak / k8scp-calico.sh
Last active November 21, 2023 09:58
Lab 2.2. Deploy a New Cluster - fix for arm64. I've modified the script slightly so now it runs on arm64 architecture without any errors. fix for worker: https://gist.github.com/kindejak/13d94f15ff9b4cda83d24727903a5fea
#!/bin/bash
# ###############################################################
# NOTE: This script was slightly edited by Jakub Kindermann on 16/11/2023 to run the script on arm64-linux architecture
################# LFD459:1.25.1 s_02/k8scp.sh ################
# The code herein is: Copyright the Linux Foundation, 2022
#
# This Copyright is retained for the purpose of protecting free
# redistribution of source.
#
# URL: https://training.linuxfoundation.org