[Gllug] imasq inconsistent
Branden Faulls
omphe at keiko.demon.co.uk
Wed Nov 13 23:14:42 UTC 2002
Paul Cupis wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Tuesday 12 November 2002 21:03, Branden Faulls wrote:
>
>
>>Paul Cupis wrote:
>>
>>
>>>You need to add a script in /etc/ppp/ip-up.d to run /etc/init.d/ipmasq
>>>restart and a script in /etc/ppp/ip-down.d to do the same.
>>>
>>>Actually, I just checked one of my systems here, and I have set up this
>>>file:
>>>
>>>paul at main:~$ cat /etc/ppp/ip-up.d/60ipmasq
>>>#! /bin/sh
>>>
>>>PATH=/sbin:/bin:/usr/sbin:/usr/bin
>>>
>>>test -f /usr/sbin/ipmasq || exit 0
>>>
>>>set -e
>>>
>>>/usr/sbin/ipmasq
>>>paul at main:~$
>>>
>>>Which does the job for me. I have the exact same file in
>>>/etc/ppp/ip-down.d (hmmm, that should probably be a symlink).
>>>
>>>Well, that is how I solved that problem here, but now I look at it again,
>>>the script should probably call /etc/init.d/ipmasq restart.
>>>
>>>
>>I set up /etc/ppp/ip-up.d/00ipmasq as described and it still requires a
>>fair amount of voodoo to get it working.
>>
>>I still have to manually restart my ethernet interface ($ ifconfig eth0
>>.....)
>>...then restart masquerading ($ ipmasq)
>>... and then it may or may not work after starting my dialup connection
>>($ pon)
>>
>>This requires a lot of jumping back and forth as root, not exactly the
>>elegant solution I'd hoped for.
>>
>>Plus side is that I can access the Web from $MS and Linux over wireless
>>(although I can't ping outside IP addresses from them?!?) Things are
>>peachy until I have to reboot!
>>
>>Which network script is fubar-ed?
>>
>>
>
>Could you give a little more detail on your network setup, please?
>
>I presume eth0 is the interface to your internal network, and ppp0 is your
>dialup interface. Scripts added to /etc/ppp/ip-up.d will only be run when
>your ppp connection is activated (using pon, for example). If you want a
>script (such as ipmasq) to run whenever you bring up the eth0 interface, you
>can put a script in /etc/network/if-up.d (from memory).
>
>Oh, and you may find using ifup/ifdown a better solution than calling ifconfig
>directly, especially if your /etc/network/interfaces configuration is
>correct.
>
>Paul Cupis
>- --
>paul at cupis.co.uk
>
>
>
Internal network configured on eth0 using 192.168.0.0/24 address space.
Physically this is just an ethernet card crossover cabled to a wireless
access point and linux and m$ boxes connected over wireless.
Dialup access on ppp0 to ISP.
/etc/ppp/ip-up.d and /etc/network/if-up.d/ each contain 00ipmasq
which is:
#!/bin/bash
#
# ipmasq.ip-up Reinitializes the ipmasq settings when PPP comes up
#
# v1.0 19 July 1998
#####
test -x /usr/sbin/ipmasq || exit 0
if [ -e /etc/ipmasq/ppp ]; then
/etc/init.d/ipmasq restart
fi
Of all the combinations, it will only work if I restart the eth0
interface and rerun ipmasq after starting the ppp0 connection.
Branden Faulls
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list