Pacific-Design.com

    
Home Index

1. Vim

2. Sort

Vim / Sort /

Sort IPs Firewall in Vim

Sort firewall in edit mode

vi /etc/iptables.rules
ma
`a
sort -k6 -n
Enter

Soft firewall in visual mode

Ctrl-V
:
!sort -k6 -n
Enter

iptables-save > /etc/iptables.rules
iptables-restore < /etc/iptables.rules
iptables -L -n