Re: MASQ not resetting.

From: James Stevenson (mistral@stevenson.zetnet.co.uk)
Date: Sun Jul 23 2000 - 17:40:52 EST


Hi

i to have the same problem i asked about this before in
numerous places and always got the same response

tcp is fine when it uses the old ip address becuase
it will die and timeout by its self but with udp
it will not nor does it die when the interface
goes done and it also does use the new ip address
from an interface like ppp0 even when
/proc/sys/net/ipv4/ip_dynaddr = 1
it has been like this since i started running a nameserver
behind a MASQing computer this was since about 2.2.10 or so
how i managed to get around it was to set the timeout on udp
packets to 1 second and bring up and interface dummy0 so the
next packet will make the MASQ entry go away when ppp0 comes up
all works again
i had problems that when i did not do this udp packets could
come from the nameserver often enough so that the MASQ entry's
timeout was always refreshed to 2 minutes hence never using
the new ip address

are there anyother ways around this the method i use
still fails sometimes

thanks
        JAmes

In local.kernel-list, you wrote:
>On Sun, Jul 23, 2000 at 03:51:33PM +0200, Rogier Wolff wrote:
>>
>> It seems as if the masq table entry has an IP address entry. Shouldn't
>> this be a reference to "the IP addr of that interface"? Thus when the
>> interface goes down and comes back up, the new addr is used?
>
>According to the NAT HOWTO (see www.samba.org/netfilter) a _masqueraded_
>connection's table entry will be dropped when the interface goes down.
>
>I assume you use an ISDN dialup (you mention the IP-up script). The problem
>is (I think) that the interface (ippp0) is _NOT_ going down. Only the ISDN
>link is, but interface, routing (and NAT entries) are kept 'up' so dynamic
>dialling can work. Of course old NAT entries are useless with a new
>connection.
>
>Probably a solution is to insert 'ifconfig ippp0 down; ifconfig ippp0 up'
>along with a possible 'route -add ...' into your IP-down script.
>
>> (it is wrong to take the masq entry down with the interface: Then
>> people with fixed-ip will see their masqed connections go down, over a
>> power-cycle of their modem)
>
>People with fixed ip-address should use SNAT not MASQUERADE. SNATed entries
>aren't dropped.
>
>Bye,
>Thorsten
>
>- --
>| Thorsten Kranzkowski Internet: dl8bcu@gmx.net |
>| Mobile: ++49 170 1876134 Snail: Niemannsweg 30, 49201 Dissen, Germany |
>| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |
>
>Please read the FAQ at http://www.tux.org/lkml/
>
>------------------------------
>

-- 
---------------------------------------------
Check Out: http://www.users.zetnet.co.uk/james/
E-Mail: mistral@stevenson.zetnet.co.uk
 10:30pm  up 6 days,  8:51,  5 users,  load average: 0.22, 0.19, 0.17

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:20 EST