Python Basix :
https://drive.google.com/open?id=1isX_wSOjt9W0XPu4mLIdR4YzU6ROzZJI
Juniper Day :
https://drive.google.com/open?id=1yzIrFdcFkqZRPq4XDNJiw8sU9Fqg40j4
Wednesday, July 25, 2018
Friday, July 20, 2018
Hardening Mikrotik
Change port telnet,ssh and winbox
disable service not use
bandwith server disable
disable service not use
bandwith server disable
/tool bandwidth-server set enabled=no
dns cache disable
ip dns set allow-remote-requests=no
proxy disable
/ip proxy set enabled=no
sock disable
/ip socks set enabled=no
upnp disable
/ip upnp set enabled=no
check traffic flow wtih torch
via CLI :
tool torch sfp1 port=any ip-protocol=any
or
Via Winbox
Thursday, July 19, 2018
Change owner folder on Linux
Command line: File ownership
Changing the ownership of a file or folder is equally as simple. Say Jacob moved a folder for Bethany into the SHARE directory – but Jacob still has ownership. This can be changed with a simple command:sudo chown -R bethany /DATA/SHARE
Let's break this down.
-
sudo – admin rights must be used since we are dealing with a folder that belongs to another user
-
chown – the command for changing ownership
-
-R – the recursive switch to make sure all child objects get the same ownership changes
-
bethany – the new owner of the folder
-
/DATA/SHARE – the directory to be modified
Ref :
https://www.linux.com/learn/how-manage-file-and-folder-permissions-linux
Wednesday, July 11, 2018
Django Python3 Framework on Ubuntu 16.04
Install Python versi 3
#apt-get install python3
Check Version python
#
python3 -V
install pip3
#
apt-get install -y python3-pip
check pip3 version
#
pip3 -V
install virtualenv
#pip3 install virtualenv
check version virtualenv
#
virtualenv --version
buat direkstory baru untuk nanti aplikasi berjalan
#mkdir django-apps
#
cd django-apps
membuat virtual env
#
virtualenv env
dan kemudian activate
#. env/bin/activate
(env) root@TS1:/home/snev/django-belajar#
Install django
#
pip install django
check version
#
django-admin --version
Membuat project
#
django-admin startproject testsite
#cd testsite
#cd testsite/
masuk dan edit setting.py
#nano ~/django-apps/testsite/testsite/settings.py
# Edit the line below with your server IP address
ALLOWED_HOSTS = ['192.168.100.6']
SAVE
cd ~/django-apps/testsite/
cara Run web service nya
#
python manage.py runserver 192.168.100.6:1818
Referensi :
https://www.digitalocean.com/community/tutorials/how-to-install-django-and-set-up-a-development-environment-on-ubuntu-16-04
Monday, July 9, 2018
Transparant Proxy on Mikrotik
From Winbox :
From CLI :
# Ini untuk enable proxy kita set di port 8080
/ip proxy set enabled=yes port=8080
# Ini kita set setiap ada traffic dari interface LAN akan di redirect ke proxy dengan port 8080
/ip firewall nat add action=redirect chain=dstnat dst-port=80,8080,3128 in-interface=ether4-LAN protocol=tcp to-ports=8080
###> Keterangan :
in-interface=ether4-LAN >>>>> ini inteface yang ke pasang ke LAN user
# Ini kita gunakan untuk alasan security jadi kita block dari interface Internet/WAN untuk menggunakan Mikrotik kita sebagai Proxy Public
/ip firewall filter add action=drop chain=input dst-port=8080 in-interface=eth1-WAN protocol=tcp
###> Keterangan :
in-interface=eth1-WAN >>>> ini interface yang ke arah WAN/POP
From CLI :
# Ini untuk enable proxy kita set di port 8080
/ip proxy set enabled=yes port=8080
# Ini kita set setiap ada traffic dari interface LAN akan di redirect ke proxy dengan port 8080
/ip firewall nat add action=redirect chain=dstnat dst-port=80,8080,3128 in-interface=ether4-LAN protocol=tcp to-ports=8080
###> Keterangan :
in-interface=ether4-LAN >>>>> ini inteface yang ke pasang ke LAN user
# Ini kita gunakan untuk alasan security jadi kita block dari interface Internet/WAN untuk menggunakan Mikrotik kita sebagai Proxy Public
/ip firewall filter add action=drop chain=input dst-port=8080 in-interface=eth1-WAN protocol=tcp
###> Keterangan :
in-interface=eth1-WAN >>>> ini interface yang ke arah WAN/POP
Wednesday, July 4, 2018
Software Box
Elementary OS :
https://drive.google.com/file/d/19iWAelxEWWT53AtH0SNdCbvj0oZrPi24/view?usp=sharing
Putty :
https://drive.google.com/open?id=1tK-t0XvqijCub1j8Cmn9bQw0kjU1Ypoy
nfdump :
https://drive.google.com/open?id=143IOux8ktdUCavhZvVCEphgw1peQdTrx
Mikrotik ISO :
https://drive.google.com/open?id=1RaLq3Q1TF32CXBVORxaDOHei2ErQyQp_
CCPROXY :
https://drive.google.com/open?id=1r1dPRUVLvLvvkRD4uQ8v0jF2YoKJGwmb
NetPerSec :
https://drive.google.com/open?id=1RRZRN_AHWCBXasw25dQgiis-zUhLMcgH
Winbox :
https://drive.google.com/open?id=1Bc81JilsVOWx8QvX3FG9Ze5tCOU_eXaP
Btest Winbox for Windows :
https://drive.google.com/open?id=1M3ld6D10Ovvj-5v0Q56-erFPUP6-UPZT
Xshel Netsarang ver 5 :
https://drive.google.com/open?id=1wLD05nu7ALQcFX-_csjXIimRvKjylAjg
https://drive.google.com/file/d/19iWAelxEWWT53AtH0SNdCbvj0oZrPi24/view?usp=sharing
Putty :
https://drive.google.com/open?id=1tK-t0XvqijCub1j8Cmn9bQw0kjU1Ypoy
nfdump :
https://drive.google.com/open?id=143IOux8ktdUCavhZvVCEphgw1peQdTrx
Mikrotik ISO :
https://drive.google.com/open?id=1RaLq3Q1TF32CXBVORxaDOHei2ErQyQp_
CCPROXY :
https://drive.google.com/open?id=1r1dPRUVLvLvvkRD4uQ8v0jF2YoKJGwmb
NetPerSec :
https://drive.google.com/open?id=1RRZRN_AHWCBXasw25dQgiis-zUhLMcgH
Winbox :
https://drive.google.com/open?id=1Bc81JilsVOWx8QvX3FG9Ze5tCOU_eXaP
Btest Winbox for Windows :
https://drive.google.com/open?id=1M3ld6D10Ovvj-5v0Q56-erFPUP6-UPZT
Xshel Netsarang ver 5 :
https://drive.google.com/open?id=1wLD05nu7ALQcFX-_csjXIimRvKjylAjg
Tuesday, July 3, 2018
Install NFSEN & NFDUMP on Ubuntu 16.04
install depedency :
apt install make gcc flex rrdtool librrd-dev libpcap-dev php librrds-perl libsocket6-perl apache2 libapache2-mod-php7.0
install nfdump :
masuk ke folder nfdump >
./configure --enable-nsel --enable-nfprofile --enable-sflow --enable-readpcap --enable-nfpcapd
make
make install
nfdump -V
cd ../nfsen-1.3.8
cpan App::cpanminus
cpann Mail::Header
cpann Mail::Internet
nano ./etc/nfsen-dist.conf
>
# user and group of the web server process
# All netflow processing will be done with this user
$WWWUSER = "www-data";
$WWWGROUP = "www-data";
# number of nfprofile processes to spawn during the profiling phase
# depends on how busy your system is and how many CPUs you have
# on very busy systems increase it to a higher value
#$PROFILERS = 2;
useradd -M -s /bin/false -G www-data netflow
mkdir -p /data/nfsen
./install.pl ./etc/nfsen-dist.conf
nano /etc/apache2/sites-enabled/000-default.conf
>
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/nfsen
DirectoryIndex nfsen.php
service apache2 restart
/data/nfsen/bin/nfsen start
#############################################
Testing >>> on Mikrotik
nano /data/nfsen/etc/nfsen.conf
%sources = (
'MIKROTIK NOC' => { 'port' => '2055', 'col' => '#00ff00', 'type' => 'netflow' },
# 'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
# 'peer1' => { 'port' => '9996', 'IP' => '172.16.17.18' },
# 'peer2' => { 'port' => '9996', 'IP' => '172.16.17.19' },
);
/etc/init.d/nfsen reconfig
Ref :
https://www.youtube.com/watch?v=rge1mBvzj5E
https://www.youtube.com/watch?v=Lfrvjbc_QtA
apt install make gcc flex rrdtool librrd-dev libpcap-dev php librrds-perl libsocket6-perl apache2 libapache2-mod-php7.0
install nfdump :
masuk ke folder nfdump >
./configure --enable-nsel --enable-nfprofile --enable-sflow --enable-readpcap --enable-nfpcapd
make
make install
nfdump -V
cd ../nfsen-1.3.8
cpan App::cpanminus
cpann Mail::Header
cpann Mail::Internet
nano ./etc/nfsen-dist.conf
>
# user and group of the web server process
# All netflow processing will be done with this user
$WWWUSER = "www-data";
$WWWGROUP = "www-data";
# number of nfprofile processes to spawn during the profiling phase
# depends on how busy your system is and how many CPUs you have
# on very busy systems increase it to a higher value
#$PROFILERS = 2;
useradd -M -s /bin/false -G www-data netflow
mkdir -p /data/nfsen
./install.pl ./etc/nfsen-dist.conf
nano /etc/apache2/sites-enabled/000-default.conf
>
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/nfsen
DirectoryIndex nfsen.php
service apache2 restart
/data/nfsen/bin/nfsen start
#############################################
Testing >>> on Mikrotik
nano /data/nfsen/etc/nfsen.conf
%sources = (
'MIKROTIK NOC' => { 'port' => '2055', 'col' => '#00ff00', 'type' => 'netflow' },
# 'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
# 'peer1' => { 'port' => '9996', 'IP' => '172.16.17.18' },
# 'peer2' => { 'port' => '9996', 'IP' => '172.16.17.19' },
);
/etc/init.d/nfsen reconfig
Ref :
https://www.youtube.com/watch?v=rge1mBvzj5E
https://www.youtube.com/watch?v=Lfrvjbc_QtA
Proxy on Linux
add this to /etc/apt/apt.conf
acquire::http:proxy "http://user:password@10.14.3.226:808/";
acquire::ftp:proxy "ftp://user:password@10.14.3.226:2121/";
acquire::http:proxy "http://user:password@10.14.3.226:808/";
acquire::ftp:proxy "ftp://user:password@10.14.3.226:2121/";
Subscribe to:
Posts (Atom)