From owner-freebsd-questions@freebsd.org Thu Sep 17 11:55:02 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB639CE5E9 for ; Thu, 17 Sep 2015 11:55:02 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3550215C0 for ; Thu, 17 Sep 2015 11:55:02 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by ioii196 with SMTP id i196so18758154ioi.3 for ; Thu, 17 Sep 2015 04:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=UsgUbAsvU+ovfCj3qKZbggMYnnSjNpvaBwK4xqBOVP8=; b=z/DkfMBG3dpguZ0VGQdeoXNvPZ0nYBeYxCcIl9ictpf0JXHpwpRazNqgsDyq6PQ4bh gCKskZoiKUlgq9PqzuiFKVMJCNMbDjpUV+LO1/4pXG8tttCD88IT2Dtodj80q5U+lYLI 3+OdTj/LVG9s67sy2mog1iGcjgMCGdvJ7ZHr3ybeoc3Ap0mn5Q8N2cywsb+lIhcVjAxL Z8aNe4oorb7l6fn2D3Lq28MViCZcodT94VDLQQnIY5uDyhSFO3BlNqr/f6nF/5veI6TS KXlxVdXzSfAjPa15nwtm395QKylyl+zQpyaByEZz5UgngeLB5Z95TuTsghMOB0LJkbsH EQag== X-Received: by 10.107.165.140 with SMTP id o134mr5096020ioe.29.1442490901488; Thu, 17 Sep 2015 04:55:01 -0700 (PDT) Received: from [10.0.10.5] (cpe-76-190-244-6.neo.res.rr.com. [76.190.244.6]) by smtp.googlemail.com with ESMTPSA id b16sm1129670iob.39.2015.09.17.04.55.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Sep 2015 04:55:00 -0700 (PDT) Message-ID: <55FAAA1B.3090306@gmail.com> Date: Thu, 17 Sep 2015 07:55:07 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: andrew clarke CC: freebsd-questions@freebsd.org Subject: Re: ppp client not relinquishing IP address References: <20150917053324.GA26115@ozzmosis.com> In-Reply-To: <20150917053324.GA26115@ozzmosis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2015 11:55:02 -0000 andrew clarke wrote: > Hi, > > I run my ADSL modem in bridge mode. Often when my the ADSL service > disconnects for whatever reason, FreeBSD's ppp client will 'hold' the > old IP address despite it no longer being connected: > > $ ifconfig tun0 > tun0: flags=8051 metric 0 mtu 1492 > options=80000 > inet 203.206.32.1 --> 150.101.32.78 netmask 0xffffff00 > inet 114.198.37.186 --> 150.101.32.44 netmask 0xffffff00 > nd6 options=21 > Opened by PID 10470 > > What's causing this, and is there any way I can prevent it? > > For one, ddclient doesn't update my dynamic DNS server with the new IP > address. > > My /etc/ppp.conf is as follows, and hopefully some useful bits of > /var/log/ppp.log below it. > > Thanks. > > Regards > Andrew > > default: > set log phase ipcp ccp tun command > nat enable yes > enable echo > enable lqr > set speed sync > set ctsrts off > set ifaddr 10.2.0.1/0 10.2.0.2/0 255.255.255.0 0.0.0.0 > > iinet: > set device PPPoE:bge0 > set authname username > set authkey password > set dial > set login > set mru 1492 > set mtu 1492 > set timeout 0 > set redial 30 0 > add default HISADDR > Here are the commands you seek. # Get dynamic IP address from ISP. set ifaddr 0.0.0.0/0 0.0.0.0/0 0.0.0.0 0.0.0.0 enable dns # Gets the ISP's DNS IP address & places them # in resolv.conf for reference by FBSD. disable iface-alias # Stop adding old IP address as alias when ppp # redials because line was lost. iface clear # Remove all previous IP address set redial 10 4 # if busy redial 4 times with 10 second pause You should be using a firewall for NAT instead of doing it in ppp.