CoovaChilli + AnyIP

Hi,

i've tried to configure CoovaChilli with anyip support but got no luck... I think that on ARP it should be ok, if i set a static ip on my laptop i.e. 10.10.10.1/24 and 10.10.10.5 as gateway i see that 10.10.10.5 points to the mac address of the "real" ethernet device chilli is attached to (in my case eth2). But nothing else works, no DNS resolution (i've added the PREROUTING iptables rules), no ping, http access etc.

Does anyone have a working anyip configuration?

This is my configuration (i've also tested without usetap...):
pidfile /var/run/chilli.pid
statedir /tmp/chilli
radiusserver1 127.0.0.1
radiusserver2 127.0.0.1
radiussecret testing123
coaport 3799
dhcpif eth2
lease 60
uamsecret testing123

dns1 10.7.99.1
dns2 10.7.99.1
#net 192.168.182.0/24
statip 192.168.182.0/24
uamserver http://192.168.182.1/hotspotlogin.cgi" target="_blank
uamhomepage http://192.168.182.1/welcome" target="_blank
uamlisten 192.168.182.1
macauth
macsuffix -mac
macpasswd testing123

ipup /etc/chilli/ipup.sh
ipdown /etc/chilli/ipdown.sh

# anyip
uamanydns
uamanyip
cmdsock /var/run/chilli.sock
usetap
----

Please help :)

How to add a Mac/IP to ARP table for good?

Dear All

Does any body knows how to add a Mac/IP to ARP table for good?

rgds

Alex

Re: CoovaChilli + AnyIP

YA COOL the any ip does work, but need to add it to the main.conf or something coova config when loading. David any thoughts on proxy ports ie: if client comes from port 8080 with static ip to get directed to 80 (since anyip works) where coova is listing? Can the thinproxy do this???? WOW anyip is awsome!!! So Cool

Re: CoovaChilli + AnyIP

Ok this is most awesome. However, I don't want to start chilli that way. I mean, if I have to I will, however I would like to start chilli automatically reading from the configs. It would appear it isn't loading these settings properly because when I just start up the router with the exact same configurations set up via the gui, I get squat.

I'm deliriously happy to see that it actually works tho. I have anyip working! I just need more dynamics. Any suggesstions?

I suppose I can just build a custom init script or something.

Re: CoovaChilli + AnyIP

I just tried the current svn version, with the following config:chilli -fd --uamanyip --net 10.1.0.0/255.255.0.0 --dynip 10.1.1.0/24 --statip 10.1.2.0/24the statip is required as it tells chilli how many ips are being used "statically" (and it allocated space for them, but doesn't really assign them ips yet). I then configured my laptop with ip 4.4.4.4/255.255.255.0 with default router 4.4.4.5. I configured it with a valid DNS server. Then, when I connect to the chilli network, I do see ioctl() errors (which I'll clean up), but they are because the route is being added multiple times, and it is indeed there:

$ netstat -nr<br />
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface<br />
4.4.4.4         10.1.0.10       255.255.255.255 UGH       0 0          0 tun0<br />
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 tun0

Re: CoovaChilli + AnyIP

Re: CoovaChilli + AnyIP

davis don't know if this help you but I'm no a writer but surfing i see:

/* Make sure we're talking about IP here */
124 dst->sin_family = AF_INET;
125 gw->sin_family = AF_INET;
126 mask->sin_family = AF_INET;
127
128 /* Set up the data for removing the default route */
129 dst->sin_addr.s_addr = 0;
130 gw->sin_addr.s_addr = 0;
131 mask->sin_addr.s_addr = 0;
132 route.rt_flags = RTF_UP | RTF_GATEWAY;
133
134 /* Remove the default route */
135 ioctl(sockfd,SIOCDELRT,&route);
136
137 /* Set up the data for adding the default route */
138 dst->sin_addr.s_addr = 0;
139 gw->sin_addr.s_addr = config->u.c.peer_ip.s_addr;
140 mask->sin_addr.s_addr = 0;
141 route.rt_flags = RTF_UP | RTF_GATEWAY;
142
143 /* Remove this route if it already exists */
144 ioctl(sockfd,SIOCDELRT,&route);
145
146 /* Add the default route */
147 if( ioctl(sockfd,SIOCADDRT,&route) == -1 ) {
148 lprintf( log, WARN, "Adding default route: %s",
149 strerror(errno));
150 return -1;
151 }

Re: CoovaChilli + AnyIP

SIOCADDRT adds a route entry in the routing table. SIOCDELRT deletes a route entry from the routing table.

ioctl(fd, cmd, (caddr_t)&route);
struct ortentry route;

cmd
Set to SIOCADDRT or SIOCDELRT.

The route entry information is passed in the ortentry structure.

Re: CoovaChilli + AnyIP

and error
tun.c: 498: 3 (No such process) ioctl(SIOCDELRT) failed
this is a route that has no sucess, error message i get

Re: CoovaChilli + AnyIP

yes I will confirm that with all set to defaults and no fancy routing the arp for the staticly assigned ip gateway is the coova unit mac address for the client Hmm. why isn't it tun 0 David instead it seems to go to eth1 ?? also when i do see my staticly assigned ip with the gateway ip/ which is the mac of coova --- and i shh to coova traceroute to static ip address assigned to client ---I go out to internet via via the wan ip. Hmm. eg 192.168.x.x I think there is no routing for the static entrys within the coova.
Since my gate way on client is the mac of coova and I'm not in arp table in the coova, how can coova know where client is if no routing to client is in place-- client has route to coova proven by mac address of coova in tcp/ip stack in client, coova has no route to client proven by no arp entrys and no routing in route command on coova.
In my general look at this coova dosen't support any ip of any kind because of no routing in coova, FYI all the latest patches applied and running 7d.
ANYONE wish to prove me wrong send config or show me the erros in my way. I would like to get proven wrong!!!! I would!!! But we are talking routing and that's it!

Re: CoovaChilli + AnyIP

screen shot, as i state any suggestion exactly like shown on right

Re: CoovaChilli + AnyIP

setup any ip as the pages show on right as discription but no anyip on static entries, got any suggestions. did you get yours to work?

Re: CoovaChilli + AnyIP

david are you on

Re: CoovaChilli + AnyIP

Does your router have iptables postrouting masquerading turned on for your WAN interface? If your problems persist (especially with the latest release), then drop into the #coova irc channel, if you can, and we can help debug your issues.

Re: CoovaChilli + AnyIP

Yes, it works without any problems if i don't set the anyip option. I tried with and without the usetap option (actually the "usetap" was just for trying, there is no tecnical reason i turned it on)

By the way i'm using coovachilli 1.0.7 because with 1.0.8 i had some strange problems, after some time (< 1 minute) the 1.0.8 just hangs and no traffic goes through (i don't get no ip from dhcp, no connection to uam etc.), very strange...

Re: CoovaChilli + AnyIP

Does it work if you aren't using anyip? Are you sure you want to use "usetap"? Let me know if this is still an issue for you...