[lug] Newbie tries to make laptop modem work

Ken Weinert mc at morat.net
Fri Dec 7 10:12:00 MST 2001


* Glenn Murray (gmurray at mines.edu) [011207 16:50]:

> Well, I also had to take down my firewall, which leads to my next
> question.  How do you maintain an ipchains firewall with a ppp
> connection via a modem?  Isn't the IP address you use in the
> ipchains script usually assigned dynamically?  Do people actually
> write scripts to read the logs, find out what ip they've been
> assigned and sed that into their ipchains scripts?  I originally
> configured the laptop's network stuff for the ethernet card and a
> static ip address.

Well, I can't guarantee this is the most efficient way to do it, but
a) it works, and b) I didn't find an already established way to do it
:)

/sbin/ifconfig|fgrep -C eth0|fgrep "inet addr" | tr -s ' ' |cut -d: -f2|cut -d' ' -f1

-- 
Ken Weinert   kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Linux 2.2.14: up 34 days, 18:19
DOS Tip #17: Add DEVICE=FNGRCROS.SYS to CONFIG.SYS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20011207/ba741108/attachment.pgp>


More information about the LUG mailing list