Sunday, November 9, 2014

How to apply static route in subinterface as redundant link.

How to apply static route in subinterface, use as a redundant link.

Add caption

 

 

 

 

 

 

 

 

 

 

 R4

interface FastEthernet1/1
 ip address 192.168.3.1 255.255.255.0
 no sh

interface FastEthernet1/0
 no sh
interface FastEthernet1/0.10
 encapsulation dot1Q 10
 ip address 10.10.10.1 255.255.255.252

interface FastEthernet1/0.20
 encapsulation dot1Q 20
 ip address 20.20.20.1 255.255.255.252

 ip route 30.30.30.0 255.255.255.252 20.20.20.2

ip sla monitor 1
 type echo protocol ipIcmpEcho 10.10.10.2 source-interface FastEthernet1/0.10
 threshold 500
 frequency 5
ip sla monitor schedule 1 life forever start-time now
track 1 rtr 1 reachability
ip route 192.168.50.0 255.255.255.0 10.10.10.2 track 1

ip sla monitor 2
 type echo protocol ipIcmpEcho 30.30.30.1 source-interface FastEthernet1/0.20
 threshold 500
 frequency 5
ip sla monitor schedule 2 life forever start-time now
track 2 rtr 2 reachability
ip route 192.168.50.0 255.255.255.0 20.20.20.2 2 track 2

                  R6

 interface FastEthernet1/0
 no sh
!
interface FastEthernet1/0.20
 encapsulation dot1Q 20
 ip address 20.20.20.2 255.255.255.252

interface FastEthernet1/1
 no sh

interface FastEthernet1/1.30
 encapsulation dot1Q 30
 ip address 30.30.30.2 255.255.255.252

ip route 192.168.3.0 255.255.255.0 20.20.20.1
ip route 192.168.50.0  255.255.255.0 30.30.30.1

        R5

interface FastEthernet1/1
 ip address 192.168.50.1 255.255.255.0
     no sh
interface FastEthernet1/0
     no sh
interface FastEthernet1/0.10
     encapsulation dot1Q 10
ip address 10.10.10.2 255.255.255.252
interface FastEthernet1/0.30
   encapsulation dot1Q 30
ip address 30.30.30.1 255.255.255.252
ip route 20.20.20.0 255.255.255.252 30.30.30.2
ip sla monitor 1
   type echo protocol ipIcmpEcho 10.10.10.1 source-interface FastEthernet1/0.10
   threshold 500
   frequency 5
ip sla monitor schedule 1 life forever start-time now
   track 1 rtr 1 reachability
ip route 192.168.3.0 255.255.255.0 10.10.10.1 track 1

ip sla monitor 2
    type echo protocol ipIcmpEcho 20.20.20.1 source-interface FastEthernet1/0.30
    threshold 500
    frequency 5
ip sla monitor schedule 2 life forever start-time now
    track 2 rtr 2 reachability
ip route 192.168.3.0 255.255.255.0 30.30.30.2 2 track 2



IF any link is DOWN and UP,  result is below.




Sunday, November 2, 2014

POP3-SSL auth with stunnel in Qmail, OS- centOS

So lets get started shall we? :)  :
yum install stunnel

mkdir -p /var/qmail/supervise/qmail-pop3s/log
vim /var/qmail/supervise/qmail-pop3s/run
 #!/bin/sh
exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver -H -R -v -l 0 -c100 0 995 \
/usr/bin/stunnel /etc/stunnel/pop3s.conf \
-l /var/qmail/bin/qmail-popup -- qmail-popup mail.ribtechbd.com \
/home/vpopmail/bin/vchkpw \
/var/qmail/bin/qmail-pop3d Maildir 2>&1

Note: Stunnel directory dependents*: /usr/bin/stunnel 

vi /var/qmail/supervise/qmail-pop3s/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t n1000 s2000000 /var/log/qmail/qmail-pop3s 2>&1

 

Note: Stunnel directory dependents*: /usr/bin/stunnel
vim /etc/stunnel/pop3s.conf
cert = /var/qmail/control/servercert.pem


# Those to are only necessary for file logging, default is stdout

debug = 7

output = /etc/stunnel/stunnel.log


#####

client = no

foreground = yes

exec = /var/qmail/bin/qmail-popup
execargs = /var/qmail/bin/qmail-popup mail.ribtechbd.com /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir

chmod +x /etc/stunnel/pop3s.conf
chmod +x /var/qmail/supervise/qmail-pop3s/run
chmod +x /var/qmail/supervise/qmail-pop3s/log/run
cp -rfp /var/log/qmail/qmail-pop3d /var/log/qmail/qmail-pop3s
touch /etc/stunnel/stunnel.log
chmod 777 /etc/stunnel/stunnel.log
 ln -s /var/qmail/supervise/qmail-pop3s /service/
 **********************************************************************************


IT working fine. 
(rajib)