Skip to content

Instantly share code, notes, and snippets.

View MalteJ's full-sized avatar

Malte Janduda MalteJ

  • SAP
  • Munich, Germany
View GitHub Profile
func macToIPv6LinkLocal(mac []byte) (net.IP, error) {
if len(mac) != 6 {
return nil, fmt.Errorf("Invalid MAC address")
}
ipv6 := net.IP{0xfe, 0x80, 0, 0, 0, 0, 0, 0, mac[0] ^ 0x02, mac[1], mac[2], 0xff, 0xfe, mac[3], mac[4], mac[5]}
if !ipv6.IsLinkLocalUnicast() {
return nil, fmt.Errorf("invalid calculation")
}
Verifying my Blockstack ID is secured with the address 1K8j3vi2XRbmpfyK3qaAWaxLQeTZkVr1yp https://explorer.blockstack.org/address/1K8j3vi2XRbmpfyK3qaAWaxLQeTZkVr1yp
input {
lumberjack {
# The port to listen on
port => 5043
# The paths to your ssl cert and key
ssl_certificate => "/opt/ssl/logstash-forwarder.crt"
ssl_key => "/opt/ssl/logstash-forwarder.key"
# Set this to whatever you want.