IPtables

Categories: linux firewall

## Set default policies
iptables -P INPUT DROP
iptables -P FOWARD DROP
iptables -P OUTPUT DROP

## Allow traffic to and from the loopback interface
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

## Allow outbound connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

## Allow others to ping this machine
iptables -A INPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

## Ratelimit incomming SSH connections
iptables -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP
iptabes -A INPUT -p tcp --dport ssh -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport ssh -m state --state NEW -j ACCEPT

## Save rules on Debian/Ubuntu
apt install iptables-persistent
netfilter-persistent save

## Save rules on RHEL
chkconfig iptables on
service iptables save



Read More →

VPN with overlapping networks

Categories: firewall

I recently needed to create a new site to site VPN, but there was a few challenges to this. First of all the router of the new site is behind NAT and it would be moved to other physical locations everynow and then. I needed something that works both behind NAT and initiates the connection, that’s when I started to think about wireguard. I have used wireguard in the past, so it wasn’t exactly new to me.


Read More →

Tips and trick using curl

Categories: linux webserver

Download files

curl -O https://test.example.com/madplan.json
curl -O -L http://test.example.com/madplan.json # Follows links. In this example the http request will be redirected to https
curl -o test.json https://test.example.com/test.json # Saves the file as test.json
 

Send host header

Usefull when the server is hosting multiple domains

curl -H "host: test.example.com" http://172.16.0.150


Read More →

Expired Kubernetes Certificates

Categories: kubernetes

I recently had an issue with my kube-apiserver restarting all the time, which meant I couldn’t use kubectl. My issue was related to expired certificates, which explains why my issue happened out of the blue.. It turns out the certificates has a 1 year validation period. This shouldn’t be an issue since you’re expected to upgrade your cluster every now and then. This is however not the case for me because my deployed software needs a specific version of kubernetes and docker with helm2 so I’m not able to update my cluster until my software vendor supports a newer kubernetes version.


Read More →

Sametime 12

Categories: hcl

Customizing Sametime 12

In file custom.env add the following

REACT_APP_PRODUCT_LOGO=/images/branding/my-logo.jpg # Change login logo
REACT_APP_MEETING_BANNER_IMAGE=/images/branding/my-logo.jpg # Change meetings logo
REACT_APP_MEETING_BACKGROUND_IMAGE=/images/branding/my-theme.jpg # Change meetings background


Read More →

Linux VRRP

Categories: Linux

Here’s some configuration examples from a VRRP(Virtual Router Redundancy Protocol) experiment i did. This is used to create a high available DNS resolver with Unbound . I used RHEL 8 as my distribution of choice, but I’m sure this can be used on any RHEL deviate or linux distribution


Read More →

HCL Sametime 11.6 failed to load

Categories: HCL

I just upgraded my HCL Sametime community server from 11.5 to 11.6. The upgrade ran successfully, but sametime didn’t load when Domino 11.0.1 FP3 was started.
I tried load staddin from the server console and it showed Sametime: Server startup successful… well that wasn’t the case when i looked at the console on my linux server.


Read More →

Hiper IPv6 configuration on pfSense

Categories: Firewall

Den danske ISP Hiper tilbyder sine DSL og Fiberkunder en /48 (65536 net, så det burde være rigeligt) native IPv6 adresser. Hiper tilbyder også at man kan benytte sin egen router i stedet for den Zyxel router de udleverer. For at bruge sin egen router skal man konfigurere sit WAN interface med VLAN 101 tagged. Se mere her https://www.hiper.dk/bredbaand/fiber


Read More →

Pizza på Weber Summit Charcoal

Categories: Food
  • 370ml lunken vand
  • 1pk tørgær
  • 60ml olivenolie
  • 12g salt
  • 100g durummel
  • 500g tipo00 mel
pizzadej
pizzadej

Ingredienserne blandes sammen i den rækkefølge de er nævnt. Det giver en mængde der svarer til 4 pizzaer, men jeg laver kun 3 ud af dem for så kan jeg få nogle større pizzaer end normalt. Jeg lader dejen stå i en skål i stuen og hæve. 2 timer inden pizzaerne skal laves bliver dejen delt op i det antal pizzaer jeg vil lave og får lov at efterhæve på bagepapir i en slukket ovn.


Read More →