Pages

Wednesday, March 23, 2016

Netflow from Juniper and Cisco



Juniper Netflow::

Our Example Flow Server: 192.168.1.10 and we want to send traffic of ge-1/0/7
We can send all interfaces traffic by setting SNMP


set forwarding-options sampling input rate 100
set forwarding-options sampling input run-length 9
set forwarding-options sampling input max-packets-per-second 7000

set forwarding-options sampling family inet output flow-server 192.168.1.10 port 9996
set forwarding-options sampling family inet output flow-server 192.168.1.10 version 5

set firewall filter all term all then sample
set firewall filter all term all then accept

set interfaces ge-1/0/7 unit 0 family inet filter input all
set interfaces ge-1/0/7 unit 0 family inet filter output all

Tuesday, March 8, 2016

MikroTik Interface Traffic Shape



queue simple
      name="Limit ether1" dst-address=0.0.0.0/0 interface=ether1 parent=none
      direction=both priority=8 queue=default-small/default-small
      limit-at=256k/256k max-limit=256k/256k burst-limit=0/0
      burst-threshold=0/0 burst-time=0s/0s total-queue=default-small
  

Thursday, March 3, 2016

Multiple FTP User for same home directory in VSFTP


*** Two FTP User Tayab and Khan will share same home directory to upload and download /var/www/html/career

cd /var/www/html
adduser tayab -d /var/www/html/career/
chown -R tayab:tayab careerbd
passwd tayab
adduser khan -d /var/www/html/career/ -g tayab
passwd khan
chmod g=rwx -R *
***
vi /etc/vsftpd/user_list
tayab
khan
------------
CentOS VSFTPD File
==================
root# cat /etc/vsftpd/vsftpd.conf
# ============================
#local_umask=07
anonymous_enable=NO
chroot_local_user=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
ftpd_banner=Welcome to Jobsbd's FTP service- by Tayab Khan.
listen=YES
pasv_min_port=2121
pasv_max_port=2142
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
userlist_deny=NO
syslog_enable=YES
xferlog_enable=NO
vsftpd_log_file=/var/log/vsftpd.log
xferlog_std_format=NO
log_ftp_protocol=YES
# =================================

Ubuntu VSFPTD FILE...
===============
root@www:~# grep "^[^#;]" /etc/vsftpd.conf
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=ftp
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
allow_writeable_chroot=YES
----------------------
vi  /etc/vsftpd.user_list
tayab
khan
=================

login via coreftp