Thanks a lot *************. Thats shades some light on my side.
Router B is on centos 5.2. Just wondering whether u can suggest for me a bridging utility to use  for the same. I believe there are several out there.

I was wondering is it possible to have a router with two subnets access a chillispot server as its main internet gateway and have all the routers subnet's clients authenticate thru the routers main Internet gateway?

Main Gateway (Chilispot rserver)
eth0 192.168.1.1
eth1 192.168.182.0
         /|\
          |
         \|/
Router with two subnets

eth0 192.168.182.5 (assigned via chillispot tthru DHCP)
eth1 192.168.21.1 ( Clients Subnet that should authenticat thru the main Gateway)
eth2 192.168.219.1 ( Clients Subnet that should authenticat thru the main Gateway)
                          /   \
                        /      \
                       /        \
192.168.21.1           192.168.219.1
( internet users to be authenticated )

How can this be achived? Thanks in advance.

Hello guys i have a small issue trying to setup a router down the line after the chillispot router. Here is an example

Router A (Chilispot router)
eth0 192.168.1.1
eth1 192.168.182.0

Router B

eth0 192.168.182.5 (assigned via chillispot from Router A)
eth1 192.168.21.1 ( Clients Subnet )
eth2 192.168.219.1 ( Clients Subnet )

Router B get its inernet from the chillispot router A and provides the same to the two subnets 192.168.21.0 and 192.168.219.0

But router B cannot provide internet to its client unless it logs in to chillispot on router A, and there after clients for router B are connected too. But i don't want that.

My question is where do i configure the settings so that Router B has direct access to the internet but its clients have to log in via chillispot in Router A.

i have tried PREROUTING in Router B but still couldn't achive this or may be am using the wrongiptable rules....

Opps sorry i had modified the above rules while trying to troubleshoot. Here is the original rules from the docs folder.

# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*mangle
:PREROUTING ACCEPT [1536:156906]
:INPUT ACCEPT [663:77454]
:FORWARD ACCEPT [83:9382]
:OUTPUT ACCEPT [206:30088]
:POSTROUTING ACCEPT [210:30358]
COMMIT
# Completed on Sat May 23 05:12:41 2009
# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*filter
:INPUT DROP [18:5514]
:FORWARD ACCEPT [4:270]
:OUTPUT ACCEPT [206:30088]
:RH-Firewall-1-INPUT - [0:0]
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -j REJECT --reject-with icmp-port-unreachable
-A RH-Firewall-1-INPUT -i eth1 -j DROP
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 443 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 3990 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A FORWARD -i eth1 -j DROP
-A FORWARD -o eth1 -j DROP
COMMIT
# Completed on Sat May 23 05:12:41 2009
# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*nat
:PREROUTING ACCEPT [5768:594546]
:POSTROUTING ACCEPT [2:72]
:OUTPUT ACCEPT [18:1081]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat May 23 05:12:41 2009

Here is the saved iptables rules after applying firewall.iptables from chillispot docs


# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*mangle
:PREROUTING ACCEPT [1536:156906]
:INPUT ACCEPT [663:77454]
:FORWARD ACCEPT [83:9382]
:OUTPUT ACCEPT [206:30088]
:POSTROUTING ACCEPT [210:30358]
COMMIT
# Completed on Sat May 23 05:12:41 2009
# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*filter
:INPUT DROP [18:5514]
:FORWARD ACCEPT [4:270]
:OUTPUT ACCEPT [206:30088]
:RH-Firewall-1-INPUT - [0:0]
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -i eth1 -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
#-A RH-Firewall-1-INPUT -i eth0 -j REJECT --reject-with icmp-port-unreachable
#-A RH-Firewall-1-INPUT -i eth1 -j DROP
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 443 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 3990 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A FORWARD -i eth1 -j DROP
-A FORWARD -o eth1 -j DROP
COMMIT
# Completed on Sat May 23 05:12:41 2009
# Generated by iptables-save v1.3.5 on Sat May 23 05:12:41 2009
*nat
:PREROUTING ACCEPT [5768:594546]
:POSTROUTING ACCEPT [2:72]
:OUTPUT ACCEPT [18:1081]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat May 23 05:12:41 2009

Am Just not that good with iptables maybe this will help shade some light on why the router does not work after applying this rules and chillispot redirect does not work too. Also need to ssh from the internal interface.
Thanks

Am in cent OS router can browse without being directed to the login page. whenever i apply the firewall.iptables script the router even stops working.

eth0 192.168.21.43 external internet
eth1 192.168.182.1 internal lan

Currently my router works fine with the following /etc/sysconfig/iptables firewall rules.

# Generated by iptables-save v1.3.5 on Fri May 22 06:11:36 2009
*nat
:PREROUTING ACCEPT [4616:519611]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [1:73]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri May 22 06:11:36 2009
# Generated by iptables-save v1.3.5 on Fri May 22 06:11:36 2009
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [824:94907]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A INPUT -i eth1 -j ACCEPT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Fri May 22 06:11:36 2009

Any suggestions on how to manipulate the rules to suit chilli would be appreciated. Thanks

7

(6 replies, posted in from Source)

I managed to solve the clearenv() function just like nemski did by replacing the function with solaris version unsetenv() for every env entry in chilli.c and tun.c
Am now stuck with dhcp_getmac() dhcp_open_eth() functions.

Is there vesrions of dhcp_getmac() and dhcp_open_eth() im solaris to handle the same requirements?
Has anyone successfully build chillispot under solaris?

Please anyone.

8

(6 replies, posted in from Source)

Ok had to manually add the required "||" binary operators in src/tun. c

Went past the above error.

Now a new error

gmake

gmake  all-recursive
gmake[1]: Entering directory `/usr/share/src/chillispot'
Making all in src
gmake[2]: Entering directory `/usr/share/src/chillispot/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT tun.o -MD -MP -MF ".deps/tun.Tpo" -c -o tun.o tun.c; \
then mv -f ".deps/tun.Tpo" ".deps/tun.Po"; else rm -f ".deps/tun.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT cmdline.o -MD -MP -MF ".deps/cmdline.Tpo" -c -o cmdline.o cmdline.c; \
then mv -f ".deps/cmdline.Tpo" ".deps/cmdline.Po"; else rm -f ".deps/cmdline.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT ippool.o -MD -MP -MF ".deps/ippool.Tpo" -c -o ippool.o ippool.c; \
then mv -f ".deps/ippool.Tpo" ".deps/ippool.Po"; else rm -f ".deps/ippool.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT radius.o -MD -MP -MF ".deps/radius.Tpo" -c -o radius.o radius.c; \
then mv -f ".deps/radius.Tpo" ".deps/radius.Po"; else rm -f ".deps/radius.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT md5.o -MD -MP -MF ".deps/md5.Tpo" -c -o md5.o md5.c; \
then mv -f ".deps/md5.Tpo" ".deps/md5.Po"; else rm -f ".deps/md5.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT redir.o -MD -MP -MF ".deps/redir.Tpo" -c -o redir.o redir.c; \
then mv -f ".deps/redir.Tpo" ".deps/redir.Po"; else rm -f ".deps/redir.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT dhcp.o -MD -MP -MF ".deps/dhcp.Tpo" -c -o dhcp.o dhcp.c; \
then mv -f ".deps/dhcp.Tpo" ".deps/dhcp.Po"; else rm -f ".deps/dhcp.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT syserr.o -MD -MP -MF ".deps/syserr.Tpo" -c -o syserr.o syserr.c; \
then mv -f ".deps/syserr.Tpo" ".deps/syserr.Po"; else rm -f ".deps/syserr.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT iphash.o -MD -MP -MF ".deps/iphash.Tpo" -c -o iphash.o iphash.c; \
then mv -f ".deps/iphash.Tpo" ".deps/iphash.Po"; else rm -f ".deps/iphash.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT lookup.o -MD -MP -MF ".deps/lookup.Tpo" -c -o lookup.o lookup.c; \
then mv -f ".deps/lookup.Tpo" ".deps/lookup.Po"; else rm -f ".deps/lookup.Tpo"; exit 1; fi
/bin/bash ../libtool --tag=CC --mode=link gcc -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl   -o chilli  chilli.o tun.o cmdline.o ippool.o radius.o md5.o redir.o dhcp.o syserr.o iphash.o lookup.o  -lsocket -lresolv -lnsl
mkdir .libs
gcc -D_GNU_SOURCE -fno-builtin -DSBINDIR=\"/usr/local/sbin\" -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -o chilli chilli.o tun.o cmdline.o ippool.o radius.o md5.o redir.o dhcp.o syserr.o iphash.o lookup.o  -lsocket -lresolv -lnsl
Undefined                       first referenced
symbol                             in file
clearenv                            chilli.o
dhcp_getmac                         chilli.o
dhcp_open_eth                       dhcp.o
ld: fatal: Symbol referencing errors. No output written to chilli
collect2: ld returned 1 exit status
gmake[2]: *** [chilli] Error 1
gmake[2]: Leaving directory `/usr/share/src/chillispot/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/share/src/chillispot'
gmake: *** [all] Error 2

Anyone?

9

(6 replies, posted in from Source)

Hello Again
I saved the above patch to /usr/src/chillispot/chillispot-1.1.0_main.patch
cd /usr/src/chillispot

removed the all chillispot-1.1.0/ in chillispot-1.1.0_main.patch

pached via gpatch
gpatch -p0 < chillispot/chillispot-1.1.0_main.patch

did a gmake
gmake clean
gmake

gmake  all-recursive
gmake[1]: Entering directory `/usr/share/src/chillispot'
Making all in src
gmake[2]: Entering directory `/usr/share/src/chillispot/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT chilli.o -MD -MP -MF ".deps/chilli.Tpo" -c -o chilli.o chilli.c; \
then mv -f ".deps/chilli.Tpo" ".deps/chilli.Po"; else rm -f ".deps/chilli.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -I/usr/include/ -I/usr/sfw/include -I/opt/csw/mysql5/include/mysql/ -I/opt/csw/include/ -I/opt/csw/include/openssl -MT tun.o -MD -MP -MF ".deps/tun.Tpo" -c -o tun.o tun.c; \
then mv -f ".deps/tun.Tpo" ".deps/tun.Po"; else rm -f ".deps/tun.Tpo"; exit 1; fi
tun.c:369:29: missing binary operator before token "defined"
tun.c:448:28: missing binary operator before token "defined"
tun.c:500:28: missing binary operator before token "defined"
tun.c:588:28: missing binary operator before token "defined"
tun.c:677:28: missing binary operator before token "defined"
tun.c:725:28: missing binary operator before token "defined"
gmake[2]: *** [tun.o] Error 1
gmake[2]: Leaving directory `/usr/share/src/chillispot/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/share/src/chillispot'
gmake: *** [all] Error 2

seems the chilli.c issue was solved but not still tun.c

Anyone?

10

(6 replies, posted in from Source)

Hi nemski

Am under solaris 5.10 Generic_138889-02 i86pc i386 i86pc and wanted ton know if u were you able to compile chillispot under solaris?
If so is it possible to post the procedure, i couldn,t go beyond gmake

gmake  all-recursive
gmake[1]: Entering directory `/usr/share/src/chillispot'
Making all in src
gmake[2]: Entering directory `/usr/share/src/chillispot/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE -fno-builtin -DSBINDIR='"/usr/local/sbin"'  -g -O2 -MT chilli.o -MD -MP -MF ".deps/chilli.Tpo" -c -o chilli.o chilli.c; \
then mv -f ".deps/chilli.Tpo" ".deps/chilli.Po"; else rm -f ".deps/chilli.Tpo"; exit 1; fi
chilli.c: In function `main':
chilli.c:3892: error: `LOG_PERROR' undeclared (first use in this function)
chilli.c:3892: error: (Each undeclared identifier is reported only once
chilli.c:3892: error: for each function it appears in.)
gmake[2]: *** [chilli.o] Error 1
gmake[2]: Leaving directory `/usr/share/src/chillispot/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/share/src/chillispot'
gmake: *** [all] Error 2