This document discusses iptables and related tools for packet filtering and network address translation (NAT). It provides information on xtables extensions that add new capabilities to iptables rules. Examples are given for common iptables rules using NAT, state tracking, and extensions. The document also covers DHCP and how to execute scripts using DHCP events like client lease commitment and expiration to dynamically update iptables rules based on DHCP leases.
4. Xtables
• “Xtables-addons is the successor to patch-o-
matic(-ng). Likewise, it contains extensions
that were not accepted in the main iptables
package
• no patches (.diff files) or POM trees
• extensions built as modules
• no reboot, instant use – also perfect for
development
5. Xtables cont..
• Download the xtables-addons
• Extract the tar file and edit the mconfig file to
install the iptable module you want
• Just do configure ,make and make install as
per INSTALL file
• Geoip,string,ipp2p,TARPIT,pknock
9. DHCP Events
• Commit
server has made a commitment of a
certain lease to a client
• Release
client has released the server from its
commitment
• Expiry
commitment expires
10. DHCP configuration
• on commit { set ClientIP = binary-to-ascii(10, 8, ".", leased-
address); execute("/home/commitip",ClientIP); }
• on release { set ClientIP = binary-to-ascii(10, 8, ".", leased-
address); execute("/home/releaseip",ClientIP); }
• on expiry { set ClientIP = binary-to-ascii(10, 8, ".", leased-
address); execute("/etc/rc5.d/expiryip",ClientIP); }
• Jun 18 09:48:39 dhcp dhcpd: execute_statement argv[0] = /home/commitip
Jun 18 09:48:39 dhcp dhcpd: execute_statement argv[1] = 192.168.34.67