[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rewriting source and destination of local packets

Phil Dyer wrote:

Hash: SHA1

Phil Dyer wrote:
NN_il_Confusionario wrote:
perhaps one could mark with iptables the local packets to be source
natted and then source nat the marked packets with ip route

I don't think that iptables alone can do it.  I'm thinking this is the
road to look down, iptables + ip route, if it can be done at all...

Martin, if/when you do find a solution, I hope you'll summarize to the
list. I find this problem quite interesting...

I'm not sure this would work, but what about setting the dynamic ip address to an environment variable. Write the iptables rule to reference the environment variable and then whenever the ipaddress changes,
update the environment variable.

Alternatively, you could have a script that deletes and re-adds the iptable rule for the dynamic address
every time the lease is renewed.

Brian D.

Reply to: