Score:0

Is there a way in iptables to shortcut to the localhost instead of using an ip address?

us flag

I have the following fules that I would like enforced.. However, if the ip address of my machine changes, I would like to keep the rules enforced. These current rules will get out dated in the event that my ip address changes.

-A OUTPUT -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff
-A OUTPUT ! -d 192.168.50.13/32 -m owner --uid-owner 130 -j MARK --set-xmark 0x1/0xffffffff
-A OUTPUT -d 192.168.50.13/32 -p udp -m udp --dport 53 -m owner --uid-owner 130 -j MARK --set-xmark 0x1/0xffffffff
-A OUTPUT -d 192.168.50.13/32 -p tcp -m tcp --dport 53 -m owner --uid-owner 130 -j MARK --set-xmark 0x1/0xffffffff
-A OUTPUT -s 192.168.50.13/32 -p tcp -m tcp -m multiport --sports 6800,7777,58846 -m owner --uid-owner 130 -j MARK --set-xmark 0x0/0xffffffff
-A OUTPUT ! -s 192.168.50.13/32 -j MARK --set-xmark 0x1/0xffffffff

In stead of using the actual IP address of the local system, I would much rather use something that changes with the ip address of the system. It's kind of silly, my ip address changes and now my firewall doesn't behave as expected.

Score:2
cn flag

Use something like -i eth0 to filter on the network interface rather than the IP address bound to the interface.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.