Skip to content

Instantly share code, notes, and snippets.

#!/bin/ksh
cd /usr/src && make clean && make obj && make -j8 build
pcaetano@builder $ > cat mkk.sh
#!/bin/ksh
export DESTDIR=/dest/
export RELEASEDIR=/usr/rel
cd /sys/arch/$(machine)/compile/GENERIC.MP
make clean
make obj
make config
make -j8 && make install
[user@work libvirt]$ ansible-playbook -vi hosts --ask-pass listnets.yml
Using /home/user/.ansible.cfg as config file
SSH password:
PLAY [all] ********************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [10.192.22.210]
TASK [config vnets] ***********************************************************************************************************************************************************************************************
@pedrompcaetano
pedrompcaetano / task output
Created February 14, 2018 17:09
task output
pedro@pocket:~/playbooks/libvirt$ ansible-playbook -vi hosts test.yml
Using /home/pedro/playbooks/libvirt/ansible.cfg as config file
PLAY [all] ****************************************************************************************************
TASK [Gathering Facts] ****************************************************************************************
ok: [127.0.0.1]
TASK [config vnets] *******************************************************************************************
ok: [127.0.0.1] => {"changed": false, "list_nets": ["default", "private"]}
@pedrompcaetano
pedrompcaetano / test.yml
Created February 14, 2018 17:07
ansible vars
---
- hosts: all
tasks:
- name: config vnets
virt_net:
command: list_nets
register: merdum
- name: get xml
virt_net:
# bgpctl show nei
BGP neighbor is 172.25.184.33, remote AS 15525
Description: voip cnx 1
BGP version 4, remote router-id 10.181.1.2
BGP state = Established, up for 05w6d14h
Last read 00:00:25, holdtime 90s, keepalive interval 30s
Neighbor capabilities:
Multiprotocol extensions: IPv4 unicast
Route Refresh
Graceful Restart: Timeout: 120, IPv4 unicast
icmp_types = "{ echoreq, unreach }"
rfc1918 = "{ 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }"
set skip on lo
block in quick from urpf-failed
anchor "oubound" on vic0 {
pass in inet proto tcp to port { ssh www https } tag GOOD
pass in inet from vic1:network tag GOOD
pass inet proto icmp icmp-type $icmp_types tag GOOD
pass out inet from self to any keep state tag GOOD
pass out inet from vic1:network nat-to (egress:0) tag GOOD
table <leased_ip_table> persist
table <abandoned_ip_table> persist
#table <bruteforce>
icmp_types = "{ echoreq, unreach }"
icmp6_types = "{ echoreq unreach timex paramprob }"
ext_if="vlan100"
int_if="{ em1 em2 em3 }"
int_networks="{ em1:network, em2:network, em3:network }"
tcp_services="{ 20, 21, 22, 43, 80, 443, 989, 990 }"
udp_services="{ 53, 123, 1194 }"
pcaetano@soekris $ > df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0a 1005M 86.1M 869M 9% /
/dev/sd0k 190G 420M 180G 0% /home
/dev/sd0d 3.9G 24.0K 3.7G 0% /tmp
/dev/sd0f 2.0G 700M 1.2G 37% /usr
/dev/sd0g 1005M 227M 727M 24% /usr/X11R6
/dev/sd0h 9.8G 450M 8.9G 5% /usr/local
/dev/sd0j 2.0G 989M 923M 52% /usr/obj
/dev/sd0i 2.0G 1.4G 444M 77% /usr/src
ob@cirrus:~$ nmap --script=ssl-cert.nse -p 443 gmail.com
Starting Nmap 7.00 ( https://nmap.org ) at 2015-12-07 15:48 CET
Nmap scan report for gmail.com (173.194.112.21)
Host is up (0.014s latency).
Other addresses for gmail.com (not scanned): 2a00:1450:4001:80b::1015 173.194.112.22
rDNS record for 173.194.112.21: fra07s27-in-f21.1e100.net
PORT STATE SERVICE
443/tcp open https