This file contains hidden or 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
[Match] | |
Name=enp0s3 | |
[Network] | |
DHCP=ipv4 | |
[Route] | |
Destination=204.8.230.0/24 | |
Gateway=192.168.1.1 | |
Metric=3 |
This file contains hidden or 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
[Match] | |
Name=enp0s3 | |
[Network] | |
DHCP=ipv4 | |
[Route] | |
Destination=204.8.230.0/24 | |
Gateway=192.168.1.1 | |
From=192.168.1.160 |
This file contains hidden or 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
table inet nat { | |
chain prerouting { | |
type nat hook prerouting priority dstnat; | |
iifname eth0 jump external-pre | |
} | |
chain external-pre { | |
tcp dport 8022 mark set 1 dnat ip to 10.200.200.2:ssh | |
tcp dport 8022 mark set 1 dnat ip6 to [fd00::2]:ssh | |
tcp dport 8080 mark set 1 dnat ip to 10.200.200.2:http |
This file contains hidden or 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
package passwordresetservice | |
import ( | |
"crypto/tls" | |
"fmt" | |
ldap "github.com/go-ldap/ldap" | |
"golang.org/x/text/encoding/unicode" | |
ber "gopkg.in/asn1-ber.v1" | |
) |
This file contains hidden or 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 | |
function awskmsencrypt() { | |
key="$1" | |
text="$2" | |
aws kms encrypt --key-id "$key" --plaintext fileb://<(echo "$text") --output text --query CiphertextBlob | |
} | |
function awskmsdecrypt() { | |
crypt="$1" #base64 |
This file contains hidden or 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
# This can be any public reachable interface | |
# basically the one connected to the internet (native or bridged) | |
[Match] | |
Name=eth1 | |
[Network] | |
# your normal interface address example: 10.1.1.2/24 | |
Address=<LOCAL_IPV4>/<NETMASK> | |
Gateway=<LOCAL_IPV4_GW> # local ip gw e.g 10.1.1.1 |
This file contains hidden or 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 | |
function awsssologin() { | |
local envexport="$1" isretry="$2" | |
local cache expires login=false | |
local awsbin=/usr/bin/aws | |
if [[ -d "$HOME/.aws/sso/cache" ]]; then | |
for cache in "$HOME"/.aws/sso/cache/*.json; do | |
if ! grep -q "startUrl" "$cache" || ! grep -q "expiresAt" "$cache"; then |
This file contains hidden or 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
$domainName = "{{ windows_domain_info['dns_domain_name'] }}" | |
$password = "{{ windows_domain_info['domain_admin_password'] }}" | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$fqdn = [System.Net.Dns]::GetHostByName(($env:computerName)) | FL HostName | Out-String | %{ "{0}" -f $_.Split(':')[1].Trim() }; | |
$filename = "C:\$fdqn.pfx" | |
$user = "{{ windows_domain_info['dns_domain_name'] }}\{{ windows_domain_info['domain_admin_user'] }}" | |
$credential = New-Object ` | |
-TypeName System.Management.Automation.PSCredential ` | |
-ArgumentList $user, $securePassword |
This file contains hidden or 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
# To build and load custom GO plugins into the Kong Ubuntu image | |
# we use a multistage docker build. The first stage uses the golang | |
# image to build the plugin. The second stage then copies that plugin | |
# into the Kong Ubuntu image. | |
# Build the golang plugin | |
FROM golang:alpine as build | |
WORKDIR /plugin | |
COPY go-plugins/* ./ |