pirmdiena, 2011. gada 9. maijs

PuTTY + vim + paste

This is annoying when you can't click mouse in vim to paste some text.
Add following lines to .vimrc to fix that:
if has('mouse')
      set mouse-=a
endif

trešdiena, 2011. gada 4. maijs

iptables in slackware

Basic firewall configuration 
Drop INPUT, FORWARD
# iptables -P INPUT DROP
# iptables -P FORWARD DROP


Accept establised
# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Accept loopback
# iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT

Accept SSH
# iptables -A INPUT -p tcp --dport 22 -i eth0 -j ACCEPT

Accept ICMP
# iptables -A INPUT -p icmp -j ACCEPT

View
# iptables -L

With line numbers
# iptables -L --line-numbers

Save
# iptables-save > /root/fw.conf

To enable on next boot, add line to /etc/rc.d/rc.local
iptables-restore < /root/fw.conf