Check out the -i and -o parameters for iptables.
If this doesn't do what you want then here's a few hints on how to go about it. I'm not at a linux machine so plz double check syntax/paths for errors
1) Write a script that flushes your iptables then sets all the rules. In this script don't use the IP addresse, but instead use a variable to describe it (e.g. $INT_IP).
2) At the beginning of the script initialize $INT_IP to be the device's IP address:
Code:
INT_IP=`ifconfig -a | grep -A 1 eth[x] | grep inet | awk -F: '{print $2}'`
3) Finally, hack the script that brings the ethernet device to "up" state to run your new script before it's done. Should be smoewhere inside /etc/sysconfig/network-script/ if i remember right
Happy Hunting
