<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=TIS-620" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Arran Cudbard-Bell wrote:
<blockquote cite="mid:4B291FBE.3080505@sussex.ac.uk" type="cite">
  <pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

chap {
        reject = 1
}



  </pre>
  <blockquote type="cite">
    <pre wrap="">I try search about unlang and write it to accept user even though wrong
password and chap reject.
i need to set wrong password user to ip group and then redirect them to
html explain about the problem.



i try this unlang in chap


authenticate {
        # 
        #  PAP authentication, when a back-end database listed
        #  in the 'authorize' section supplies a password.  The
        #  password can be clear-text, or encrypted.
        Auth-Type PAP {
                pap
        }

        #
        #  Most people want CHAP authentication
        #  A back-end database listed in the 'authorize' section
        #  MUST supply a CLEAR TEXT password.  Encrypted passwords
        #  won't work.
        Auth-Type CHAP {
                chap


if (reject) {

                       update reply {

                               Framed-IP-Address = "13.0.0.0+"
                               Framed-IP-Netmask = "255.255.255.0"

                        }

                        update control {
                              Auth-Type := "Accept"
            
                        }
                }

}


and it 's not work...

Could any one point me how to solve this?
Or what i should change on      if (reject) {  
Or What section should it put this unlang.

Or give me some unlang scripts.


Thank you in advance.



-- 
<a class="moz-txt-link-freetext" href="http://www.EasyHorpak.com">http://www.EasyHorpak.com</a> - à¹�หลà¹�à¸�à¸�à¹�à¸�หาหอà¸�ัà¸�,อà¸�ารà¹�ทเมà¸�ทà¹�,à¹�มà¸�à¸�ัà¹�à¸�,à¸�อà¸�à¹�ด,à¹�รà¸�à¹�รม
<a class="moz-txt-link-freetext" href="http://www.EasyZoneCorp.net">http://www.EasyZoneCorp.net</a> - à¸�อà¸�à¹�วรà¹�à¸�ัดà¸�าร internet à¸�ุณภาà¸�สูà¸� Hotpsot à¹�ละ
PPPoE ,Anti NetCut, Mac spoof
<a class="moz-txt-link-freetext" href="http://www.thai-school.net">http://www.thai-school.net</a> - à¹€à¸§à¹�à¸�à¹�à¸�ตà¹�à¹�รà¸�เรียà¸�,ศิษยà¹�เà¸�à¹�า à¸ªà¸³à¹€à¸£à¹�à¸�รูà¸�
EasyZone SuperLink <a class="moz-txt-link-rfc2396E"
 href="http://www.easyhorpak.com/superlink"><http://www.easyhorpak.com/superlink></a> - à¹�ลà¸�หมืà¹�à¸�ลิà¹�à¸�à¸�ืà¹�à¸�à¸�
ลิ��เดียว



-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext"
 href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
- -- 
Arran Cudbard-Bell <a class="moz-txt-link-rfc2396E"
 href="mailto:A.Cudbard-Bell@sussex.ac.uk"><A.Cudbard-Bell@sussex.ac.uk></a>,
Systems Administrator (AAA),
Infrastructure Services (IT Services),
E1-1-08, Engineering 1, University Of Sussex, Brighton, BN1 9QT
DDI+FAX: +44 1273 873900 | INT: 3900
GPG: 86FF A285 1AA1 EE40 D228 7C2E 71A9 25BB 1E68 54A2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext"
 href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a>

iEYEARECAAYFAkspH74ACgkQcaklux5oVKLE+gCePfzCo4HQSXidGjotxSMS42ic
8IUAmwVLU44TbE/Ezz3FiS84vrarFwEF
=acnc
-----END PGP SIGNATURE-----

  </pre>
</blockquote>
Thank you Arran Cudbard-Bell.<br>
<br>
with your short reply i try this.<br>
<br>
authenticate {<br>
        #<br>
        #  PAP authentication, when a back-end database listed<br>
        #  in the 'authorize' section supplies a password.  The<br>
        #  password can be clear-text, or encrypted.<br>
        Auth-Type PAP {<br>
                pap<br>
        }<br>
<br>
        #<br>
        #  Most people want CHAP authentication<br>
        #  A back-end database listed in the 'authorize' section<br>
        #  MUST supply a CLEAR TEXT password.  Encrypted passwords<br>
        #  won't work.<br>
        Auth-Type CHAP {<br>
                chap {<br>
reject = 1<br>
}<br>
<br>
if (reject) {<br>
<br>
                       update reply {<br>
<br>
                               Framed-IP-Address = "13.0.0.0+"<br>
                               Framed-IP-Netmask = "255.255.255.0"<br>
<br>
                        }<br>
<br>
                        update control {<br>
                              Auth-Type := "Accept"<br>
<br>
                        }<br>
ok<br>
                }<br>
<br>
<br>
<br>
        }<br>
<br>
<br>
<br>
it works  now !! GREAT !!<br>
<br>
bad password user can accept and get ip 13.0.0.0+<br>
good user  can accept and get ip 192.168.99.1+<br>
<br>
and then i create iptables to redirect bad password to html to explain
what happen.<br>
<br>
<br>
I spent many night with panda eyes to find this unlang. now it resolved.<br>
<br>
Thank you so much Arran Cudbard-Bell . You are Great!!.<br>
<br>
<br>
<div class="moz-signature">-- <br>
<a href="http://www.EasyHorpak.com" target="_blank">http://www.EasyHorpak.com</a>
- áËÅ觤é¹ËÒË;ѡ,;ÒÃì·àÁ¹·ì,áÁ¹ªÑè¹,¤Í¹â´,âçáÃÁ<br>
<a href="http://www.EasyZoneCorp.net" target="_blank">http://www.EasyZoneCorp.net</a>
- «Í¿áÇÃì¨Ñ´¡Òàinternet ¤Ø³ÀÒ¾ÊÙ§ Hotpsot áÅРPPPoE ,Anti NetCut, Mac
spoof<br>
<a href="http://www.thai-school.net" target="_blank">http://www.thai-school.net</a>
- àÇçºä«µìâçàÃÕ¹,ÈÔÉÂìà¡èÒ ÊÓàÃç¨ÃÙ» <br>
<a href="http://www.easyhorpak.com/superlink" target="_blank">EasyZone
SuperLink </a> - áÅ¡ËÁ×è¹ÅÔ駤×㹤ÅÔê¡à´ÕÂÇ <br>
</div>
</body>
</html>