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 | |
| MY_NAMESERVER=192.168.0.1 | |
| VPN_DOMAINS="example.org" | |
| sudo mkdir -p /etc/resolver | |
| #for DOMAIN in ${VPN_DOMAINS} | |
| #do | |
| # echo -e "d.init\nget State:/Network/Service/net.juniper.pulse.nc.main/DNS\nd.show" | scutil | awk '/ServerAddresses/{flag=1;next}/\}/{flag=0}flag {printf "nameserver %s\n", $NF}' | sudo tee /etc/resolver/${DOMAIN} | |
| #done | |
| echo -e "d.init\nd.add ServerAddresses * ${MY_NAMESERVER}\nset State:/Network/Service/net.juniper.pulse.nc.main/DNS" | sudo scutil | |
| sudo route -n delete -inet6 default fd00::a20:3c09 |
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 | |
| MY_NAMESERVER=192.168.0.1 | |
| VPN_DOMAINS="example.org" | |
| sudo mkdir -p /etc/resolver | |
| for DOMAIN in ${VPN_DOMAINS} | |
| do | |
| echo -e "d.init\nget State:/Network/Service/net.juniper.pulse.nc.main/DNS\nd.show" | scutil | awk '/ServerAddresses/{flag=1;next}/\}/{flag=0}flag {printf "nameserver %s\n", $NF}' | sudo tee /etc/resolver/${DOMAIN} | |
| done | |
| echo -e "d.init\nd.add ServerAddresses * ${MY_NAMESERVER}\nset State:/Network/Service/net.juniper.pulse.nc.main/DNS" | sudo scutil |
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
| require 'openssl' | |
| Puppet::Type.type(:self_signed).provide(:linux ) do | |
| defaultfor :kernel => 'Linux' | |
| mk_resource_methods | |
| def initialize(value={}) | |
| super(value) | |
| @property_flush = {} | |
| end |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am b4ldr on github. | |
| * I am b4ldr (https://keybase.io/b4ldr) on keybase. | |
| * I have a public key whose fingerprint is F060 3A8A A1A3 C834 EF80 2F76 8B41 82B1 196B 2D27 | |
| To claim this, I am signing this object: |
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
| node /^[a-z]{3}\d{,2}\.example\.org$/ inherits default { | |
| @@nexpose_host { | |
| $::fqdn: | |
| ensure => present, | |
| siteid => 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
| (0)[502]~ $ sipcalc 2001:db8:1::/64 | |
| -[ipv6 : 2001:db8:1::/64] - 0 | |
| [IPV6 INFO] | |
| Expanded Address - 2001:0db8:0001:0000:0000:0000:0000:0000 | |
| Compressed address - 2001:db8:1:: | |
| Subnet prefix (masked) - 2001:db8:1:0:0:0:0:0/64 | |
| Address ID (masked) - 0:0:0:0:0:0:0:0/64 | |
| Prefix address - ffff:ffff:ffff:ffff:0:0:0:0 | |
| Prefix length - 64 |
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 made no difference | |
| cat /etc/quagga/bgpd.conf | |
| router bgp 64496 | |
| ! | |
| bgp router-id 192.168.1.200 | |
| ! | |
| neighbor 2001:DB8:1::1 remote-as 64497 | |
| no neighbor 2001:DB8:1::1 activate | |
| neighbor 2001:DB8:1::1 interface eth0 | |
| neighbor 2001:DB8:1::1 description upstream |
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
| class::hash: | |
| %{hiera('class::hash')} | |
| exrta: | |
| value: | |
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
| interfaces => dummy0,dummy0_0,eth0,eth1,lo | |
| ipaddress_eth0 => 192.2.0.1 | |
| macaddress_eth0 => 60:eb:69:8f:88:19 | |
| macaddress_eth1 => 60:eb:69:8f:88:1a | |
| mtu_eth0 => 1500 | |
| mtu_eth1 => 1500 | |
| netmask_eth0 => 255.255.255.128 |
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
| for i in /proc/*/fd/* | |
| do | |
| SOCKET_INODE=$(stat -c %N ${i} 2>/dev/null | awk -F\: '/socket:\[[0-9]+\]/ {gsub(/[\[\]]/, "", $NF);print $NF}') | |
| [ "${SOCKET_INODE%?}" == "${INODE}" ] && awk -F\/ '{print $3}'<<< ${i} | |
| done |