Skip to content

Instantly share code, notes, and snippets.

---
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
name: filebeat
namespace: monitoring
spec:
type: filebeat
version: 8.2.0
elasticsearchRef:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana-logging
namespace: monitoring
spec:
version: 8.2.2
count: 1
elasticsearchRef:
name: elasticsearch-logging
# This sample sets up an Elasticsearch cluster with 3 nodes.
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch-logging
namespace: monitoring
spec:
version: 8.2.0
nodeSets:
- name: default
# Connect Keenetic router to zaborona.help
# https://github.com/zhovner/zaborona_help/wiki/Zyxel-Keenetic-(new-web-interface)
# https://ntc.party/t/zyxel-keenetic-ultra/698/9
nobind
client
remote vpn.zaborona.help
remote-cert-tls server
cipher AES-128-CBC
setenv opt ncp-ciphers AES-128-GCM
...
vpn_client_cidr_block = "10.0.192.0/19"
vpn_dns_servers = ["1.1.1.1", "8.8.8.8"]
@Amet13
Amet13 / vpn.tf
Last active September 23, 2023 11:32
# SAML providers from metadata documents downloaded before
resource "aws_iam_saml_provider" "vpn" {
name = "vpn"
saml_metadata_document = file("${path.module}/files/VPN_ins-mymetadata-file.xml")
}
resource "aws_iam_saml_provider" "vpn_self_service" {
name = "vpn-self-service"
saml_metadata_document = file("${path.module}/files/VPN Self-Service_ins-mymetadata-file.xml")
}
$ git clone https://github.com/OpenVPN/easy-rsa.git
$ cd easy-rsa/easyrsa3
$ ./easyrsa init-pki
$ ./easyrsa build-ca nopass
...
Common Name (eg: your user, host, or server name) [Easy-RSA CA]:vpn.domain.org
$ ./easyrsa build-server-full vpn-aws-server nopass
$ ./easyrsa build-client-full vpn-aws-client nopass
@Amet13
Amet13 / copy_certs
Last active October 16, 2021 13:10
$ mkdir ~/.vpn-assets/
$ cp pki/ca.crt ~/.vpn-assets/
$ cp pki/private/ca.key ~/.vpn-assets/
$ cp pki/issued/vpn-aws-*.crt ~/.vpn-assets/
$ cp pki/private/vpn-aws-*.key ~/.vpn-assets/
$ aws --profile common \
--region eu-central-1 \
acm import-certificate \
--certificate fileb://$HOME/.vpn-assets/vpn-aws-server.crt \
# Add to terraform.tfvars
...
vpc_dev_accepter_id = "vpc-12345678"
module "common_dev_peering" {
source = "grem11n/vpc-peering/aws"
version = "4.0.1"
providers = {
aws.this = aws
aws.peer = aws.dev
}
this_vpc_id = module.vpc.vpc_id