Skip to content

Instantly share code, notes, and snippets.

View kaworu's full-sized avatar

Alexandre Perrin kaworu

View GitHub Profile
key:
name: smaug2mani
algorithm: hmac-sha1
secret: "yaaaaa"
pattern:
name: "mani"
zonefile: "slave/rolinh/%s.zone"
allow-notify: 37.59.30.58 smaug2mani
request-xfr: AXFR 37.59.30.58@53 smaug2mani
#!/bin/sh
datadir="/home/huongviet.ch/ror"
daemon="/usr/local/bin/unicorn_rails18"
daemon_flags="--host :: --port 8000 --env production --debug --daemonize"
daemon_user="huongviet.ch"
. /etc/rc.d/rc.subr
# ping -c1 enospoon.net && arp -na
PING enospoon.net (178.63.43.248): 56 data bytes
64 bytes from 178.63.43.248: icmp_seq=0 ttl=255 time=0.125 ms
--- enospoon.net ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.125/0.125/0.125/0.000 ms
? (178.63.43.193) at 00:26:88:76:0d:21 on re0 expires in 693 seconds [ethernet]
? (178.63.43.209) at 50:46:5d:9f:f9:fe on re0 permanent [ethernet]
? (178.63.43.249) at 50:46:5d:9f:f9:fe on re0 permanent [ethernet]
# ping -c3 178.63.43.248 && arp -na
PING 178.63.43.248 (178.63.43.248): 56 data bytes
64 bytes from 178.63.43.248: icmp_seq=0 ttl=255 time=0.192 ms
64 bytes from 178.63.43.248: icmp_seq=1 ttl=255 time=0.115 ms
64 bytes from 178.63.43.248: icmp_seq=2 ttl=255 time=0.123 ms
--- 178.63.43.248 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.115/0.143/0.192/0.035 ms
? (178.63.43.193) at 00:26:88:76:0d:21 on re0 expires in 573 seconds [ethernet]
# arp -na
? (178.63.43.193) at 00:26:88:76:0d:21 on re0 expires in 757 seconds [ethernet]
? (178.63.43.209) at 50:46:5d:9f:f9:fe on re0 permanent [ethernet]
? (178.63.43.249) at 50:46:5d:9f:f9:fe on re0 permanent [ethernet]
Host Ethernet Address Netif Expire Flags
178.63.43.193 00:26:88:76:0d:21 vio0 19m26s
178.63.43.248 00:50:56:00:6d:cd vio0 permanent l
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
default 178.63.43.193 UGS 0 0 - 8 vio0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHl 0 0 32768 1 lo0
178.63.43.192/26 link#1 UC 0 0 - 4 vio0
178.63.43.193 76:69:6f:30:00:00 UHLS 1 0 - 8 vio0
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
default 178.63.43.193 UGS 0 0 - 8 vio0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHl 1 0 32768 1 lo0
178.63.43.192/26 link#1 UC 1 0 - 4 vio0
178.63.43.193 link#1 UHLc 1 0 - 4 vio0
ifconfig_re0="inet 178.63.43.209/32"
gateway_if="re0"
gateway_ip="178.63.43.193"
static_routes="gateway default"
route_gateway="-host $gateway_ip -interface $gateway_if"
route_default="default $gateway_ip"
# pkg install sysutils/grub2-bhyve # port will pull gcc...
config from https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html
# kldload vmm
# sysctl net.link.tap.up_on_open=1
# ifconfig tap0 create
# ifconfig bridge0 create
# ifconfig bridge0 addm re0 addm tap0
# ifconfig bridge0 up
# sysctl net.inet.ip.forwarding=1