<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>x83.net &#187; tacacs</title>
	<atom:link href="http://www.x83.net/tag/tacacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Sat, 24 Jul 2010 09:50:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Juniper Tacacs &amp; Rancid</title>
		<link>http://www.x83.net/juniper-tacacs-rancid/</link>
		<comments>http://www.x83.net/juniper-tacacs-rancid/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 06:36:03 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[authentication-order]]></category>
		<category><![CDATA[rancid]]></category>
		<category><![CDATA[tacacs]]></category>
		<category><![CDATA[tacplus]]></category>
		<category><![CDATA[tac_plus]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=191</guid>
		<description><![CDATA[Short howto on Configure Tacacs+ and Rancid on Juniper.
Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.
Install tcp_wrappers and tacacs
yum install -y tcp_wrappers
yum install -y tcp_wrappers-devel
yum install -y tcp_wrappers-libs
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz
tar zxvf tacacs+-F4.0.4.15.tar.gz
cd tacacs+-F4.0.4.15
./configure
make
make install
Setup tacacs.conf
key = &#8220;secretkey&#8221;
accounting file = /var/log/tac_plus
acl = HomeNet {
permit = 10.2.2.1
}
user = rancid {
default [...]]]></description>
			<content:encoded><![CDATA[<p>Short howto on Configure Tacacs+ and Rancid on Juniper.</p>
<p>Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.</p>
<p><strong>Install tcp_wrappers and tacacs</strong></p>
<blockquote><p>yum install -y tcp_wrappers<br />
yum install -y tcp_wrappers-devel<br />
yum install -y tcp_wrappers-libs<br />
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz<br />
tar zxvf tacacs+-F4.0.4.15.tar.gz<br />
cd tacacs+-F4.0.4.15<br />
./configure<br />
make<br />
make install</p></blockquote>
<p><strong>Setup tacacs.conf</strong></p>
<blockquote><p>key = &#8220;secretkey&#8221;<br />
accounting file = /var/log/tac_plus<br />
acl = HomeNet {<br />
permit = 10.2.2.1<br />
}<br />
user = rancid {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}<br />
}<br />
user = giany {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}</p>
<p>}</p></blockquote>
<p><strong>Configure Juniper Tacacs</strong></p>
<blockquote><p>set system authentication-order [ tacplus password ]</p>
<p>set system tacplus-server 10.2.2.1 secret secretkey<br />
set system accounting events login<br />
set system accounting events interactive-commands<br />
set system accounting destination tacplus<br />
set system login class network permissions network<br />
set system login class network permissions view<br />
set system login user operations full-name &#8220;Users with Full Access&#8221;<br />
set system login user operations uid 9999<br />
set system login user operations class super-user<br />
set system login user operations authentication encrypted-password &#8220;xxx&#8221;<br />
set system login user restricted full-name &#8220;Restricted&#8221;<br />
set system login user restricted uid 2000<br />
set system login user restricted class read-only<br />
set system login user restricted authentication encrypted-password &#8220;xxx&#8221;</p></blockquote>
<p><strong>RANCID</strong></p>
<blockquote><p># adduser rancid<br />
Download ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.1.tar.gz<br />
# tar zxvf rancid-2.3.1.tar.gz<br />
# cd rancid-2.3.1<br />
# ./configure &#8211;prefix=/home/rancid<br />
# su &#8211; rancid<br />
# set CVSROOT /home/rancid/var/CVS<br />
# cvs init<br />
# rancid-cvs</p></blockquote>
<p><strong>.cloginrc</strong></p>
<blockquote><p>add method 10.2.2.2 ssh</p>
<p>add method 10.100.100.1 ssh<br />
add user olive rancid<br />
add user cisco rancid<br />
add password olive {mypass} {mypass}<br />
add password cisco {mypass} {mypass}</p></blockquote>
<p><strong>Debug</strong></p>
<blockquote><p>[rancid@box ~]$ clogin cisco<br />
cisco<br />
spawn ssh -c 3des -x -l rancid cisco<br />
rancid@cisco&#8217;s password:<br />
Corp:2&gt;enable<br />
Password:<br />
Corp:2#</p>
<p>[rancid@box ~]$ jlogin olive<br />
olive<br />
spawn ssh -c 3des -x -l rancid olive</p>
<p>WARNING: You are being watched.<br />
rancid@olive&#8217;s password:<br />
&#8212; JUNOS 7.4R2.6 built 2006-01-20 14:27:46 UTC<br />
rancid@olive.x83.net&gt;</p></blockquote>
<blockquote><p># tail -f /var/log/tac_plus</p>
<p>Mon Aug  4 16:20:37 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=263    process*mgd[7038]       cmd=logout<br />
Mon Aug  4 16:26:15 2008        10.100.100.1    rancid  tty2    10.100.100.100  start   task_id=58      timezone=UTC    service=shell<br />
Mon Aug  4 16:26:43 2008        10.100.100.1    rancid  tty2    10.100.100.100  stop    task_id=58      timezone=UTC    service=shell       disc-cause=1    disc-cause-ext=1020     connect-progress=101    elapsed_time=28 nas-rx-speed=0  nas-tx-speed=0<br />
Mon Aug  4 16:26:56 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7045]   cmd=login<br />
Mon Aug  4 16:27:03 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=8      process*mgd[7045]       cmd=logout<br />
Mon Aug  4 16:27:15 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7049]   cmd=login</p></blockquote>
<p>Set idle-timeout so after a while a user will get disconnect:</p>
<blockquote><p>login<br />
class admin {<br />
idle-timeout 4;<br />
permissions all;<br />
}<br />
user test {<br />
class admin<br />
}</p></blockquote>
<p>On terminal you will get smth like that:</p>
<blockquote><p>test@br0&gt; Warning: session will be closed in 1 minute if there is no activity<br />
Warning: session will be closed in 10 seconds if there is no activity<br />
Idle timeout exceeded: closing session<br />
Connection closed by foreign host.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-tacacs-rancid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First steps configuring Juniper Routers</title>
		<link>http://www.x83.net/first-steps-configuring-juniper-routers/</link>
		<comments>http://www.x83.net/first-steps-configuring-juniper-routers/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 03:34:34 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[olive]]></category>
		<category><![CDATA[reboot]]></category>
		<category><![CDATA[rollback]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[tacacs]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=53</guid>
		<description><![CDATA[Configure the router
Use the following commands to configure the router:


	root# cli
	root@>
	cli> configure
	[edit]
	root@# set system host-name olive.x83.net
	root@# set system domain-name x83.net
	root@# set interfaces fxp0 unit 0 family inet address 10.2.2.2/24
	root@# set system backup-router 10.2.2.1
	root@# set system name-server 10.2.2.1
	root@# set system root-authentication plain-text-password
	New password:
	Retype password:
	root@ show
	system {
	    host-name olive.x83.net;
	    domain-name x83.net;
	 [...]]]></description>
			<content:encoded><![CDATA[<p>Configure the router</p>
<p>Use the following commands to configure the router:</p>
<pre>

	root# cli
	root@>
	cli> configure
	[edit]
	root@# set system host-name olive.x83.net
	root@# set system domain-name x83.net
	root@# set interfaces fxp0 unit 0 family inet address 10.2.2.2/24
	root@# set system backup-router 10.2.2.1
	root@# set system name-server 10.2.2.1
	root@# set system root-authentication plain-text-password
	New password:
	Retype password:
	root@ show
	system {
	    host-name olive.x83.net;
	    domain-name x83.net;
	    backup-router 10.2.2.1;
	    root-authentication {
	         encrypted-password "$1$gNTKIVLL$nSw2LduQttCiGipspveEq."; ## SECRET-DATA
	    }
	    name-server {
	         10.2.2.1;
	}
	interfaces {
	    fxp0 {
	        unit 0 {
	            family inet {
	                address 10.2.2.2/24;
	            }
	        }
	    }
	}
	root@# commit
	root@olive.x83.net# exit
	root@olive.x83.net>
</pre>
<p>Other config params :</p>
<pre>
        root@olive.x83.net# set system ntp server  192.168.2.100
	root@olive.x83.net# set system time-zone Europe/Bucharest
	root@olive.x83.net# set system services ssh
	root@olive.x83.net# set interfaces lo0 unit 0 family inet address  10.200.200.1/32
</pre>
<pre>
root@olive.x83.net> configure  exclusive   //if several people login only you can use "configure"
root@olive.x83.net> status
root@olive.x83.net> request system logout user  john //kick someone out
</pre>
<p>The &#8221;&#8221;&#8217;show | display set&#8221;&#8221;&#8217; command is a handy way to reverse-engineer a router configuration when you are trying to duplicate portions of a configuration on many routers or when you need to write up configuration, monitoring, or troubleshooting procedures for your network operations staff. This command is especially useful if the configuration is complex and when setting it up involves many long commands and lots of typing.</p>
<p><strong>Add comments</strong></p>
<pre>

root@olive.x83.net# set area  0.0.0.0 interface fe-0/0/0
root@olive.x83.net# annotate area  0.0.0.0 "MESH routers"
root@olive.x83.net# show
	/* MESH routers */
	area 0.0.0.0 {
	     interface fe-0/0/0.0;
	}
</pre>
<p>To delete a comment, use the annotate command with an empty string:</p>
<pre>
root@olive.x83.net# annotate area  0.0.0.0 ""
</pre>
<p><strong>Check syntax (commit)</strong></p>
<p>After configuring issue &#8221;&#8221;&#8217;commit&#8221;&#8221;&#8217; command.</p>
<pre>

root@olive.x83.net# commit check 
</pre>
<p>If there are no errors you recieve : &#8221;configuration check succeeds&#8221;</p>
<p>To debug commit : </p>
<pre>

root@olive.x83.net# commit | display detail
</pre>
<p>To exit from a lower level to operational mode : &#8221;&#8221;exit configuration-mode&#8221;&#8221;</p>
<p><strong>Backing up configuration</strong></p>
<pre>

root@olive.x83.net# file copy /config/juniper.conf.gz  box:/root/tmp
root@olive.x83.net# save box:configMay
root@olive.x83.net# save  configMay                     //copy to a localfile
root@olive.x83.net# run file show  configMay         //to view it
root@olive.x83.net# run show system storage       // view diskspace
</pre>
<p>To backup every time you &#8221;&#8221;&#8217;commit&#8221;&#8221;&#8217;:</p>
<pre>

root@olive.x83.net# set archival configuration transfer-on-commit
root@olive.x83.net# set archival configuration archive-sites ftp: //giany:password@box:/m40configs
</pre>
<p><strong>Rollback </strong></p>
<pre>

root@olive.x83.net# rollback 1   //loads other config
root@olive.x83.net# show
root@olive.x83.net# commit
root@olive.x83.net# rollback ?  //view rollbacks
</pre>
<p><strong>View logs</strong></p>
<p> root@olive.x83.net# run show log<br />
 root@olive.x83.net# run show log messages</p>
<p><strong>Install different jinstall</strong></p>
<p> root@olive.x83.net# request system software add validate box:jinstall-8.4R2.6-domestic-signed.tgz</p>
<p>Or copy the file to /var/tmp</p>
<p> root@olive.x83.net# file copy box:jinstall-8.4R2.6-domestic-signed.tgz /var/tmp<br />
 root@olive.x83.net# request system software add validate /var/tmp/jinstall-8.4R2.6-domestic-signed.tgz  //and reboot here</p>
<p>and then reboot:</p>
<p> root@olive.x83.net# request system reboot</p>
<p><strong>Gather system informations </strong></p>
<p> root@olive.x83.net# show version<br />
 root@olive.x83.net# show version detail<br />
 root@olive.x83.net# show system processes<br />
 root@olive.x83.net# run show system processes | match /syslogd<br />
 root@olive.x83.net# run request support information<br />
 root@olive.x83.net# run file list detail /var/tmp   //look for cores</p>
<pre>

root@olive.x83.net# run show system users 

 2:40PM  up 10:12, 1 user, load averages: 0.01, 0.06, 0.07
USER     TTY      FROM                              LOGIN@  IDLE WHAT
root     p1       10.2.2.1                         2:28PM      - cli 
</pre>
<pre>

root@olive.x83.net# run show system uptime
Current time: 2008-05-24 13:52:15 EEST
System booted: 2008-05-24 04:29:05 EEST (09:23:10 ago)
Protocols started: 2008-05-24 04:34:42 EEST (09:17:33 ago)
Last configured: 2008-05-24 13:38:28 EEST (00:13:47 ago) by root
 1:52PM  up 9:23, 1 user, load averages: 0.00, 0.02, 0.00
</pre>
<p><strong>Accounts </strong></p>
<pre>

root@olive.x83.net# set system login user giany full-name Giany
root@olive.x83.net# set system login user giany uid 1000
root@olive.x83.net# set system login user giany class super-user
root@olive.x83.net# set system login user giany authentication encrypted-password "$1$gNTKIVLL$nSw2LduQttCiGipspveE3."
</pre>
<pre>

root@olive.x83.net# set system login password password maximum-length 18   // max length
root@olive.x83.net# set system login password password minimum-length 8   // min lenght
root@olive.x83.net# set system login password password minimum-changes 3   // 3 case changes
</pre>
<p><strong>Tacacs </strong></p>
<p>To allow authentification of users :</p>
<p> root@olive.x83.net# set login user operations class super-user<br />
 root@olive.x83.net# set login user operations full-name &#8220;Operations Account&#8221;<br />
 root@olive.x83.net# set login user operations uid 9999<br />
 root@olive.x83.net# set system authentication-order [ tacplus password ];<br />
 root@olive.x83.net# set tacacs-server 10.2.2.1 secret aaaaa</p>
<p> <strong>SSH/Telnet Filter</strong></p>
<p>You want to filter incoming ssh/telnet connections to a set of ips. First create a prefix-list with allowed ips then create a policer that will discard all incoming connections. After that create the policer that will allow your prefix-list. In the end create the filters for discard/accept and apply the filter to the specified interface.</p>
<pre>

set policy-options prefix-list telnet-ssh-sessions 10.2.2.1/32
set firewall policer 1m-bw-limit if-exceeding bandwidth-limit 1m
set firewall policer 1m-bw-limit if-exceeding burst-size-limit 15k
set firewall policer 1m-bw-limit then discard
set firewall policer 20m-bw-limit if-exceeding bandwidth-limit 20m
set firewall policer 20m-bw-limit if-exceeding burst-size-limit 1m
set firewall policer 20m-bw-limit then discard
set firewall filter re-filter term police-ssh from source-prefix-list telnet-ssh-sessions
set firewall filter re-filter term police-ssh from protocol tcp
set firewall filter re-filter term police-ssh from port ssh
set firewall filter re-filter term police-ssh from port telnet
set firewall filter re-filter term police-ssh from tcp-initial
set firewall filter re-filter term police-ssh then policer 1m-bw-limit
set firewall filter re-filter term police-ssh then accept
set firewall filter re-filter term ssh-telnet from source-prefix-list telnet-ssh-sessions
set firewall filter re-filter term ssh-telnet from protocol tcp
set firewall filter re-filter term ssh-telnet from port ssh
set firewall filter re-filter term ssh-telnet from port telnet
set firewall filter re-filter term ssh-telnet then policer 20m-bw-limit
set firewall filter re-filter term ssh-telnet then accept

set interfaces fxp0 unit 0 family inet filter input re-filter         //apply filter
</pre>
<p><strong>Sending messages</strong></p>
<pre>

request message all message "Log out immediately"
request system logout terminal p0
request system logout user giany
request message user giany message "Log out immediately"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/first-steps-configuring-juniper-routers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco Tacacs configuration</title>
		<link>http://www.x83.net/cisco-tacacs-configuration/</link>
		<comments>http://www.x83.net/cisco-tacacs-configuration/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 02:35:36 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[aaa]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[tac]]></category>
		<category><![CDATA[tacacs]]></category>
		<category><![CDATA[tacacs-server]]></category>

		<guid isPermaLink="false">http://x83.net/blog/?p=40</guid>
		<description><![CDATA[
aaa new-model
aaa authentication login default group tacacs+ enable
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default stop-only group tacacs+
aaa accounting network default start-stop group tacacs+
aaa accounting connection default start-stop group tacacs+
aaa accounting system default start-stop group tacacs+

tacacs-server host 10.100.100.100 timeout 5
no tacacs-server directed-request
tacacs-server key 7 key

Also check   : 
]]></description>
			<content:encoded><![CDATA[<pre>
aaa new-model
aaa authentication login default group tacacs+ enable
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default stop-only group tacacs+
aaa accounting network default start-stop group tacacs+
aaa accounting connection default start-stop group tacacs+
aaa accounting system default start-stop group tacacs+

tacacs-server host 10.100.100.100 timeout 5
no tacacs-server directed-request
tacacs-server key 7 key
</pre>
<p>Also check   : <a href="http://www.x83.net/w/Juniper_Tacacs_&#038;_Rancid"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/cisco-tacacs-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
