Posts

Showing posts from March, 2018

test ssl connection

$ openssl s_client -connect blog.honeynet.org.my:443 error result would be:: CONNECTED(00000003) write:errno=104 --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 305 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session:     Protocol  : TLSv1.2     Cipher    : 0000     Session-ID:     Session-ID-ctx:     Master-Key:     Key-Arg   : None     PSK identity: None     PSK identity hint: None     SRP username: None     Start Time: 1520475849     Timeout   : 300 (sec)     Verify return code: 0 (ok) --- ok result would be:: CONNECTED(00000003) depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA ...

snat vs masquerade

# stick to SNAT for static IP iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth0 -j SNAT --to-source ELASTIC_IP # don't be lazy, simple but slower due to more overhead iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE ref:  https://terrywang.net/2016/02/02/new-iptables-gotchas.html