# Radius Server Using Chillispot, FreeRadius On FreeBSD 7.2 Problem



## harryosborn (Apr 8, 2010)

Could anyone help me in solvin this problem?
I've tried to install and configure radius server on freebsd 7.2 using chillispot, freeradius. I followed this link address http://www.geeklan.co.uk/files/freebsd_chillispot_installguide.txt.

After following that step, I run radius debug using /usr/local/sbin/radiusd -X, the end line result :


```
Module: Instantiated radutmp (radutmp)
Listening on authentication *:1812
Listening on accounting *:1813
Ready to process requests.
```


After finishing following step by step in that link address, I tried to run step number 10 and the command is
radtest steve testing localhost 1812 s3cr3t
when I run that command the result is
     XFaliled to get value,

before running step number 10, I tried to run the daemon of freeradius first. Radius daemon is located in the directory /usr/local/etc/rc.d/radiusd. I run the command like this
`/usr/local/etc/rc.d/radiusd start`
then I checked the radius daemon status using command `/usr/local/etc/rc.d/radiusd status`. The status result is radius is not running. When I knew radius daemon was not running, I tried to run chown command like this
`chown -R radiusd : radiusd /usr/local/etc/rc.d/radiusd`. Then I run the radius daemon again using command `/usr/local/etc/rc.d/radiusd start`. It's been solved. Radius daemon can run.

Ok radiusd can run and I can see the PID. But when I run chillispot daemon, using command
`/usr/local/etc/rc.d/chillispot start`, the result is the shame. Chillispot is not running. In solving this problem I made a user for chillispot daemon like this :

```
Username: chilli
Full name: chillispot
Uid (Leave empty for default): 
Login group [chilli]: 
Login group is radiusd. Invite chilli into other groups? []: 
Login class [default]: 
Shell (sh csh tcsh nologin) [sh]: nologin
Home directory [/home/chilli]: /nonexistent 
Use password-based authentication? [yes]: 
Use an empty password? (yes/no) [no]: 
Use a random password? (yes/no) [no]: y
Lock out the account after creation? [no]: y
Username   : chilli
Password   : <random>
Full Name  : chillispot
Uid        : 1003
Class      : 
Groups     : chilli 
Home       : /nonexistent
Shell      : /usr/sbin/nologin
Locked     : yes
OK? (yes/no): y
adduser: INFO: Successfully added (chilli) to the user database.
adduser: INFO: Password for (chilli) is: blablabla123
adduser: INFO: Account (chilli) is locked.
```

then  I run command for change the own of chillispot daemon using command :
`chown -R chilli:chilli /usr/local/etc/rc.d/chillispot`
then I run chillispot daemon to start
`/usr/local/etc/rc.d/chillispot start
/usr/local/etc/rc.d/chillispot status`. The result : chillispot is not running. I also check the log using : `tail -f /var/log/messages` and the log message :


```
Apr  7 23:28:04  chillispot[1127]: tun.c: 603: 17 (File exists) write() failed
Apr  7 23:28:04  chillispot[1127]: redir.c: 532: 49 (Can't assign requested address) bind() failed
Apr  7 23:28:04  chillispot[1127]: chilli.c: 3559: Failed to create redir
```

I'm still confused what the meaning of tun.c, redir.c, chilli.c. Could anyone help me please in solving this problem? 

best regards,

harry


----------



## SirDice (Apr 8, 2010)

harryosborn said:
			
		

> Radius daemon is located in the directory /usr/local/etc/rc.d/radiusd.


No, that's just a script to start the radius daemon.



> I run the command like this /usr/local/etc/rc.d/radiud start
> then I checked the radius daemon status using command /usr/local/etc/rc.d/radiusd status. The status result is radius is not running. When I knew radius daemon was not running, I tried to run chown command like this
> chown -R radiusd : radiusd /usr/local/etc/rc.d/radiusd. Then I run the radius daemon again using command /usr/local/etc/rc.d/radiusd start. It's been solved. Radius daemon can run.


I'm doubtful changing the ownership of the startup script has any effect at all on the daemon itself.



> then I run command for change the own of chillispot daemon using command :
> chown -R chilli:chilli /usr/local/etc/rc.d/chillispot


Again, you are changing the ownership of a startup script. 



> ```
> Apr 7 23:28:04 chillispot[1127]: tun.c: 603: 17 (File exists) write() failed
> Apr 7 23:28:04 chillispot[1127]: redir.c: 532: 49 (Can't assign requested address) bind() failed
> Apr 7 23:28:04 chillispot[1127]: chilli.c: 3559: Failed to create redir
> ```


Fix the error in the config.


----------



## harryosborn (Apr 8, 2010)

SirDice said:
			
		

> No, that's just a script to start the radius daemon.
> 
> 
> I'm doubtful changing the ownership of the startup script has any effect at all on the daemon itself.
> ...



I'm sorry  just giving adition information. Before I changed the ownership of startup script. I checked using command 
`ls -l /usr/local/etc/rc.d/radiusd`
the result is

```
-r-xr-xr-x 1 root:wheel 760 3 Apr 20:04 /usr/local/etc/rc.d/radiusd
```
after that I run

```
/usr/local/etc/rc.d/radiusd start
/usr/local/etc/rc.d/radiusd status
```
the result :

```
radiusd is not running
```

that's why I tried to change ownership /usr/local/etc/rc.d/radiusd
`chown radiusd:radiusd /usr/local/etc/rc.d/radiusd`
I tried to run :

```
/usr/local/etc/rc.d/radiusd start
/usr/local/etc/rc.d/radiusd status
```
the result :

```
radiusd is running
PID 1320
```

could you tell me what happened it?
as far as I know, FreeBSD has policy in ownership. Correct Me If I'm Wrong


----------



## harryosborn (Apr 8, 2010)

I'm sorry the command should not `chown radiusd:radiusd /usr/local/etc/rc.d/radiusd`
it should be `chown radiusd : radiusd /usr/local/etc/rc.d/radiusd`

sorry for wrong typing because of emoticon


----------



## SirDice (Apr 8, 2010)

Please use [code] tags for system output. 

Read /var/log/messages when openradius fails to start. I'm sure there will be a clue in there.

Changing the ownership of a startup script does absolutely nothing.


----------



## DutchDaemon (Apr 8, 2010)

@harryosborn - please use proper formatting on your posts, because they're almost impossible to comprehend without them:
Posting and Editing in the FreeBSD Forums.


----------



## harryosborn (May 1, 2010)

ok I see, I'd like to say thanks for your attention, suggestion


----------



## nyahnyo (Jul 19, 2010)

hi,please help me
i have error in chillispot service
this is error report from /var/log/messages


```
May 18 03:01:05 pelatihan chillispot[1754]: tun.c: 603: 17 (File exists) write() failed
May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 234: 6 (Device not configured) ioctl(SIOCSIFFLAGS) failed
May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 213: 6 (Device not configured) ioctl(SIOCSIFFLAGS) failed
May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 281: 6 (Device not configured) ioctl(SIOCSIFADDR) failed
May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 549: 6 (Device not configured) ioctl() failed
May 18 03:01:05 pelatihan chillispot[1754]: chilli.c: 3503: Failed to create dhcp
```

if anyone can help me???


----------



## DutchDaemon (Jul 19, 2010)

nyahnyo, do *not* double-post.


----------



## nyahnyo (Jul 19, 2010)

DutchDaemon said:
			
		

> nyahnyo, do *not* double-post.



ok sir,i am sorry about this..

can you answer for my question sir??


----------



## DutchDaemon (Jul 19, 2010)

Wouldn't I have done that if I could?


----------



## alphajim (Jul 20, 2010)

nyahnyo said:
			
		

> hi,please help me
> i have error in chillispot service
> this is error report from /var/log/messages
> 
> ...



What are your tun settings in your chilli.conf file?  I'd say your tun device isn't probably isn't configured correctly. 
jim


----------



## nyahnyo (Jul 29, 2010)

now i have other problem,
config chilli.conf :

```
int_if = em1
ext_if = em0
chilli_if = tun0
```

have got the ip dhcp client, but client can not ping the interface em0. even though all packets are not blocked. think about what's wrong with this problem? following the results of ifconfig from my server.


```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:01:d7:86
        inet 192.168.0.128 netmask 0xffffff00 broadcast 192.168.0.255
        inet 192.168.0.93 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:01:d7:90
        inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        inet 192.168.182.1 --> 192.168.182.1 netmask 0xffffff00
        Opened by PID 5317
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33204
[root@PA /home/cahyo]#
```
chillispot NAT on whether the process is not successful?


----------



## DutchDaemon (Jul 29, 2010)

Use 
	
	



```
tags, dude.
```


----------

