RE: How to obtain a new wireless host's IP address?

"Scott C. Lemon" <[email protected]>
Newsgroups gmane.network.nocat
Organization HumanXtensions L.L.C.
Message-ID <000001c4cb8c$53bafd80$400a640a@NewCell>
Ok ... I'm going to take a shot at this ...  ;-)

Looking at the various *.fw files, you will see that they are all just shell
scripts.  You ought to be able to edit the access.fw script, and simply add
a statement to output the IP address parameter ($3?) to any other file, etc.
that you like.

Access.fw appears to look like:

==================================================
#!/bin/sh

# Note: your PATH is inherited from the gateway process
#

usage="Usage: $0 [permit|deny] [MAC] [IP] [Class]"
action=$1
mac=$2
ip=$3
class=$4

if [ "$action" == "permit" ]; then
    cmd="-A"
elif [ "$action" == "deny" ]; then
    cmd="-D"
else
    echo $usage
    exit 1
fi

if [ -z "$ip" ]; then
    echo $usage
    exit 1
fi

iptables -t nat $cmd NoCat_OK -j ACCEPT
==================================================

As you can see, it ought to be easy to just add a line to output any of the
parms that you want to ...


Scott C. Lemon
 
 


-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Pankaj Godbole
Sent: Monday, November 15, 2004 7:15 PM
To: [email protected]
Subject: Re: [NoCat] How to obtain a new wireless host's IP address?


Thanks! 

I am facing a couple of problems:

1) I'm using NoCatSplash which is written in C and so can't patch a Perl
script to it. Is there a C equivalent?
2) It appears that I would have to run access.fw explicitly.

I am wondering if there's a simple way to just have NoCatSplash itself send
a notification to stdout (or better yet a text file) with a new user's
MAC/IP addresses, apart from updating the IPTables?

I agree that just reading the IP tables would be a straightforward way. But
this would be a bit cumbersome for me since it would require my application
to sit in a loop periodically querying the IP tables, and afterwards update
a text file with the new info.

Any help would be appreciated!

Thanks,
Pankaj.







On Mon, 15 Nov 2004 09:24:44 -0500, Bernie O'Connor <[email protected]>
wrote:
> 
> See this thread that refers to the userlog patch:
> 
> http://lists.nocat.net/pipermail/nocat/2003-December/004067.html
> 
> The patch and description is here: 
> http://www.usegroup.de/software/nocat/
> 
> bernie
> 
> 
> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Pankaj Godbole
> Sent: Friday, November 12, 2004 9:33 PM
> To: [email protected]
> Subject: [NoCat] How to obtain a new wireless host's IP address?
> 
> Hi All,
> 
> I have a question regarding NoCatSplash. For a service that I am 
> developing for wireless clients, I need to obtain a new wireless 
> host's IP address or MAC address immediately after he/she is 
> authenticated.
> 
> My question is: Is there a way to obtain address information from 
> NoCatSplash without having to modify the source code? E.g. does 
> NoCatSplash update a text file with this information? If not, can I 
> somehow get NoCatSplash to run my own script to obtain the address 
> info., as soon as the user is authenticated? Please help.
> 
> Thanks,
> Pankaj.
> _______________________________________________
> NoCat mailing list
> [email protected] http://lists.nocat.net/mailman/listinfo/nocat
> _______________________________________________
> NoCat mailing list
> [email protected]
> http://lists.nocat.net/mailman/listinfo/nocat
>
_______________________________________________
NoCat mailing list
[email protected] http://lists.nocat.net/mailman/listinfo/nocat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.