<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Security</title><link>https://blog.networksec.in/</link><description>Recent content on Security</description><generator>Hugo - gohugo.io</generator><language>en</language><contact>vijay.ronan@gmail.com</contact><copyright>&copy;<a href="https://github.com/vijayronan">Vijay Ronan</a> 2020</copyright><atom:link href="https://blog.networksec.in/index.xml" rel="self" type="application/rss+xml"/><item><title>Tmux Sheet Cheat</title><link>https://blog.networksec.in/tmux/</link><pubDate>Mon, 16 Mar 2020 17:23:17 +0000</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/tmux/</guid><description/><content>&lt;pre&gt;&lt;code&gt;# remap prefix from &#39;C-b&#39; to &#39;C-a&#39;
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
#setting the delay between prefix and command
set -s escape-time 1
#Set the base index for windows to 1 instead of 0
set -g base-index 1
bind r source-file ~/.tmux.conf
#Set the default terminal mode to 256color mode
set -g default-terminal &amp;quot;screen-256color&amp;quot;
#SET Color for the active window
setw -g window-status-current-style fg=white,bold,bg=red
#Status line righ side - 31-Oct 13:37
set -g status-right &amp;quot;#[fg=black]%d %b %R&amp;quot;
#Update the status line every sixty seconds
set -g status-interval 60
#set the color of the window list
setw -g window-status-style fg=cyan,bg=black
#enable vi keys.
setw -g mode-keys vi
#enable mouse
set -g mouse on
bind Escape copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
unbind p
bind p paste-buffer
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Nexpose</title><link>https://blog.networksec.in/nexpose/</link><pubDate>Wed, 15 May 2019 21:57:22 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/nexpose/</guid><description/><content>&lt;p&gt;Nexpose components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Security Console&lt;/strong&gt; - This is the component you’ll use to create sites, run scans, generate reports, and much more. The Security Console is accessed via a web-based user interface through any of our supported browsers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PostgreSQL database&lt;/strong&gt; - The embedded PostgreSQL databases stores all the asset scan data and is used for generating reports.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local Scan Engine&lt;/strong&gt; - Scan Engines are responsible for performing scan jobs on your assets. Your installation includes a local Scan Engine that you can use for trial purposes like this one. Note that Scan Engines only store scan data temporarily before sending it back to the Security Console for integration and long-term storage.&lt;/li&gt;
&lt;/ul&gt;</content></item><item><title>Macos Bash</title><link>https://blog.networksec.in/macos-bash/</link><pubDate>Wed, 15 May 2019 19:26:25 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/macos-bash/</guid><description/><content>&lt;pre&gt;&lt;code&gt;export PS1=&amp;quot;\[\033[0m\]\w\$ &amp;quot;
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls=&#39;ls -GFh&#39;
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Nmap</title><link>https://blog.networksec.in/nmap/</link><pubDate>Sat, 04 May 2019 00:12:12 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/nmap/</guid><description/><content>
&lt;p&gt;Nmap is an open-source network scanner. It is used to discover hosts and services on a computer network by sending packets and analyzing the responses.&lt;/p&gt;
&lt;h2 id=&#34;features&#34;&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Host discovery&lt;/strong&gt; Identifying hosts on a network. For example, listing the hosts that respond to TCP and/or ICMP requests or have a particular port open.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Port scanning&lt;/strong&gt; Enumerating the open ports on target hosts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version detection&lt;/strong&gt; – Interrogating network services on remote devices to determine application name and version number&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OS detection&lt;/strong&gt; – Determining the operating system and hardware characteristics of network devices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scriptable interaction with the target&lt;/strong&gt; – using Nmap Scripting Engine(NSE) and Lua programming language.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;host-discovery&#34;&gt;Host Discovery&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ping Scan -sn&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TCP SYN Scan -sn -PS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TCP ACK Scan -sn -PA&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;scan-all-tcp-ports&#34;&gt;Scan all TCP ports&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nmap -n -p- 192.168.1.1
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>SNMP Configuration Juniper SRX</title><link>https://blog.networksec.in/snmp-configuration-juniper-srx/</link><pubDate>Tue, 26 Jun 2018 23:50:47 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/snmp-configuration-juniper-srx/</guid><description/><content>
&lt;h2 id=&#34;allow-snmp-service-from-security-zone&#34;&gt;Allow SNMP service from Security Zone&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;set security zones security-zone trust host-inbound-traffic system-services snmp
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;set-snap-community-and-allowed-clients&#34;&gt;Set snap community and Allowed clients&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;set snmp community ZIodZHut3jTjHRiYBzpg authorization read-only
set snmp community ZIodZHut3jTjHRiYBzpg clients 10.11.50.137/32
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Timezone Convert Python</title><link>https://blog.networksec.in/timezone-convert-python/</link><pubDate>Sat, 23 Jun 2018 14:22:24 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/timezone-convert-python/</guid><description/><content>
&lt;h2 id=&#34;install-pytz-module&#34;&gt;Install pytz module&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;pip install pytz
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;from datetime import datetime
from pytz import timezone
fmt = &amp;quot;%b %d %H:%M&amp;quot;
# Current time in UTC
utc_time = datetime.now(timezone(&#39;UTC&#39;))
# Convert to IST time zone
ist_time = utc_time.astimezone(timezone(&#39;Asia/Kolkata&#39;))
ist_time = ist_time.strftime(fmt)
print ist_time
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Reinstall Windows Bootloader</title><link>https://blog.networksec.in/reinstall-windows-bootloader/</link><pubDate>Sat, 23 Jun 2018 14:17:18 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/reinstall-windows-bootloader/</guid><description/><content>&lt;ul&gt;
&lt;li&gt;Boot from DVD&lt;/li&gt;
&lt;li&gt;go to repaire option&lt;/li&gt;
&lt;li&gt;It will auto dectec the C drive
Go to command prompt&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;bootrec /fixmbr
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;repair the boot loader&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bootrec /fixboot
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;write new bootloader to MBR&lt;/p&gt;</content></item><item><title>Django Http Request Meta</title><link>https://blog.networksec.in/django-http-request-meta/</link><pubDate>Sat, 23 Jun 2018 14:13:16 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/django-http-request-meta/</guid><description/><content>&lt;p&gt;A standard Python dictionary containing all available HTTP headers. Available headers depend on the client and server, but here are some examples:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;request.META.get(&#39;HTTP_USER_AGENT&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;CONTENT_LENGTH – The length of the request body (as a string).
CONTENT_TYPE – The MIME type of the request body.
HTTP_ACCEPT – Acceptable content types for the response.
HTTP_ACCEPT_ENCODING – Acceptable encodings for the response.
HTTP_ACCEPT_LANGUAGE – Acceptable languages for the response.
HTTP_HOST – The HTTP Host header sent by the client.
HTTP_REFERER – The referring page, if any.
HTTP_USER_AGENT – The client’s user-agent string.
QUERY_STRING – The query string, as a single (unparsed) string.
REMOTE_ADDR – The IP address of the client.
REMOTE_HOST – The hostname of the client.
REMOTE_USER – The user authenticated by the Web server, if any.
REQUEST_METHOD – A string such as “GET” or “POST”.
SERVER_NAME – The hostname of the server.
SERVER_PORT – The port of the server (as a string).
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Git Commands</title><link>https://blog.networksec.in/git-commands/</link><pubDate>Sat, 23 Jun 2018 13:50:07 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/git-commands/</guid><description/><content>
&lt;h2 id=&#34;major-git-commands&#34;&gt;Major GIT commands:&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;git config
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sets configuration values for your user name, email, gpg key, preferred diff algorithm, file formats and more. Example: git config &amp;ndash;global user.name &amp;ldquo;My Name&amp;rdquo; git config &amp;ndash;global user.email &amp;ldquo;user@domain.com&amp;rdquo; cat ~/.gitconfig [user] name = My Name email = user@domain.com&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Initializes a git repository – creates the initial ‘.git’ directory in a new or in an existing project. Example: cd /home/user/my_new_git_folder/ git init&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Makes a Git repository copy from a remote source. Also adds the original location as a remote so you can fetch from it again and push to it if you have permissions. Example: git clone git@github.com:user/test.git&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Adds files changes in your working directory to your index. Example: git add .&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git rm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Removes files from your index and your working directory so they will not be tracked. Example: git rm filename&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git commit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Takes all of the changes written in the index, creates a new commit object pointing to it and sets the branch to point to that new commit. Examples: git commit -m ‘committing added changes’ git commit -a -m ‘committing all changes, equals to git add and git commit’&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows you the status of files in the index versus the working directory. It will list out files that are untracked (only in your working directory), modified (tracked but not yet updated in your index), and staged (added to your index and ready for committing). Example: git status # On branch master # # Initial commit # # Untracked files: # (use &amp;ldquo;git add &lt;file&gt;&amp;hellip; &amp;ldquo; to include in what will be committed) # # README nothing added to commit but untracked files present (use &amp;ldquo;git add&amp;rdquo; to track)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git branch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lists existing branches, including remote branches if ‘-a’ is provided. Creates a new branch if a branch name is provided. Example: git branch -a * master remotes/origin/master&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git checkout
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Checks out a different branch – switches branches by updating the index, working tree, and HEAD to reflect the chosen branch. Example: git checkout newbranch&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git merge
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Merges one or more branches into your current branch and automatically creates a new commit if there are no conflicts. Example: git merge newbranchversion&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git reset
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Resets your index and working directory to the state of your last commit. Example: git reset &amp;ndash;hard HEAD&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git stash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Temporarily saves changes that you don’t want to commit immediately. You can apply the changes later. Example: git stash Saved working directory and index state &amp;ldquo;WIP on master: 84f241e first commit&amp;rdquo; HEAD is now at 84f241e first commit (To restore them type &amp;ldquo;git stash apply&amp;rdquo;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git tag
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Tags a specific commit with a simple, human readable handle that never moves. Example: git tag -a v1.0 -m &amp;lsquo;this is version 1.0 tag&amp;rsquo;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git fetch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fetches all the objects from the remote repository that are not present in the local one. Example: git fetch origin&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git pull
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fetches the files from the remote repository and merges it with your local one. This command is equal to the git fetch and the git merge sequence. Example: git pull origin&lt;/p&gt;
&lt;p&gt;git push
Pushes all the modified local objects to the remote repository and advances its branches. Example: git push origin master&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git remote
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows all the remote versions of your repository. Example: git remote origin&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows a listing of commits on a branch including the corresponding details. Example: git log commit 84f241e8a0d768fb37ff7ad40e294b61a99a0abe Author: User &lt;a href=&#34;mailto:user@domain.com&#34; target=&#34;_blank&#34;&gt;user@domain.com&lt;/a&gt; Date: Mon May 3 09:24:05 2010 +0300 first commit&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git show
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows information about a git object. Example: git show commit 84f241e8a0d768fb37ff7ad40e294b61a99a0abe Author: User &lt;a href=&#34;mailto:user@domain.com&#34; target=&#34;_blank&#34;&gt;user@domain.com&lt;/a&gt; Date: Mon May 3 09:24:05 2010 +0300 first commit diff &amp;ndash;git a/README b/README new file mode 100644 index 0000000..e69de29&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows a tree object, including the mode and the name of each item and the SHA-1 value of the blob or the tree that it points to. Example: git ls-tree master^{tree} 100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 README&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git cat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Used to view the type of an object through the SHA-1 value. Example: git cat-file -t e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 blob&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git grep
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lets you search through your trees of content for words and phrases. Example: git grep &amp;ldquo;www.siteground.com&amp;rdquo; &amp;ndash; *.php&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git diff
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Generates patch files or statistics of differences between paths or files in your git repository, or your index or your working directory. Example: git diff&lt;/p&gt;</content></item><item><title>NAT Configuration ASA</title><link>https://blog.networksec.in/nat-configuration-asa/</link><pubDate>Sat, 23 Jun 2018 13:38:12 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/nat-configuration-asa/</guid><description/><content>
&lt;h2 id=&#34;static-nat&#34;&gt;Static NAT&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;object network host-10.29.29.33
host 10.29.29.33
nat (dmz,outside) static 103.252.X.X
access-list outside-inside extended permit ip any object host-10.29.29.33
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;source-nat&#34;&gt;Source NAT&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;object network net-10.29.0.0
nat (any,outside) dynamic interface
object network host-10.29.20.62
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>NAT Configuration Netscreen</title><link>https://blog.networksec.in/nat-configuration-netscree/</link><pubDate>Sat, 23 Jun 2018 13:32:42 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/nat-configuration-netscree/</guid><description/><content>&lt;pre&gt;&lt;code&gt;set interface &amp;quot;&amp;lt;INTERFACE_NAME&amp;gt;&amp;quot; mip &amp;lt;PUBLIC_IP&amp;gt; host &amp;lt;PRIVATE_IP&amp;gt; netmask 255.255.255.255 vr &amp;quot;trust-vr&amp;quot;
set policy id 200 from &amp;quot;Untrust&amp;quot; to &amp;quot;Trust&amp;quot; &amp;quot;Any-IPv4&amp;quot; &amp;quot;MIP(&amp;lt;PUBLIC_IP&amp;gt;)&amp;quot; &amp;quot;ANY&amp;quot; permit log
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Django and Mysql in Ubuntu</title><link>https://blog.networksec.in/django-and-mysql-in-ubuntu/</link><pubDate>Sat, 23 Jun 2018 11:59:20 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/django-and-mysql-in-ubuntu/</guid><description/><content>
&lt;h2 id=&#34;install-required-packages&#34;&gt;Install required packages&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install python-pip python-dev python-virtualenv mysql-server libmysqlclient-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-project-and-virtualenv&#34;&gt;Create project and virtualenv&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;mkdir ipinfinity &amp;amp;&amp;amp; cd ipinfinity
virtualenv venv
pip install &amp;quot;django&amp;lt;1.9&amp;quot; mysqlclient
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-database-in-mysql-and-change-setting-in-django&#34;&gt;Create database in Mysql and change setting in django&lt;/h2&gt;
&lt;p&gt;Change database setting to mysql&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;DATABASES = {
&#39;default&#39;: {
&#39;ENGINE&#39;: &#39;django.db.backends.mysql&#39;,
&#39;NAME&#39;: &#39;myproject&#39;,
&#39;USER&#39;: &#39;myprojectuser&#39;,
&#39;PASSWORD&#39;: &#39;password&#39;,
&#39;HOST&#39;: &#39;localhost&#39;,
&#39;PORT&#39;: &#39;&#39;,
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;migrate-to-mysql-and-create-super-user&#34;&gt;Migrate to Mysql and create super user&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Juniper SRX Sessions</title><link>https://blog.networksec.in/juniper-srx-sessions/</link><pubDate>Fri, 22 Jun 2018 01:09:10 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/juniper-srx-sessions/</guid><description/><content>
&lt;h2 id=&#34;display-sessions-summary&#34;&gt;Display Sessions Summary&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;show security flow session summary
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;display-all-sessions&#34;&gt;Display All Sessions&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;show security flow session
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;terminate-all-sessions&#34;&gt;Terminate All Sessions&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;clear security flow session all
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;display-a-specific-source-ip-subnet-session&#34;&gt;Display a Specific Source IP / Subnet Session&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;show security flow session source-prefix 10.29.29.93
show security flow session source-prefix 10.29.28.0/24
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;display-a-specific-destination-ip-subnet-port-session&#34;&gt;Display a Specific Destination IP / Subnet / Port Session&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;show security flow session destination-prefix 4.2.2.2
show security flow session destination-prefix 8.8.8.0/8
show security flow session destination-port 80
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;terminate-the-session-whose-session-id-you-specify&#34;&gt;Terminate the session whose session ID you specify&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;clear security flow session session-identifier 40000381
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Pat Configuration Vyatta</title><link>https://blog.networksec.in/pat-configuration-vyatta/</link><pubDate>Fri, 22 Jun 2018 00:43:24 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/pat-configuration-vyatta/</guid><description/><content>
&lt;h2 id=&#34;pat-configuration-in-vyatta&#34;&gt;PAT Configuration in Vyatta&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;set nat source rule 10 outbound-interface eth0
set nat source rule 10 source address 10.29.29.0/24
set nat source rule 10 translation address masquerade
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>SSH Configuration ASA</title><link>https://blog.networksec.in/ssh-configuration-asa/</link><pubDate>Mon, 23 Jun 2014 14:05:09 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/ssh-configuration-asa/</guid><description/><content>
&lt;h2 id=&#34;set-hostname&#34;&gt;Set hostname&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;asa(config)# hostname asa1
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;set-domain-name&#34;&gt;Set domain name&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;asa1(config)# domain-name blog.smsid.in&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;create-rsa-key&#34;&gt;Create RSA Key&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;asa1(config)# crypto key generate rsa modulus 1024
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;allow-ssh-from-inside-outside&#34;&gt;Allow ssh from inside/ Outside&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;asa1(config)# ssh 0.0.0.0 0.0.0.0 outside
asa1(config)# ssh 0.0.0.0 0.0.0.0 inside
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-local-user-account&#34;&gt;Create Local user account&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;asa1(config)# username admin password ******* privilege 15
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;local-user-account-database-to-ssh-aaa-group&#34;&gt;Local user account database to SSH AAA group&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;asa1(config)# aaa authentication ssh console LOCAL
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Ubuntu Static IP Address</title><link>https://blog.networksec.in/ubuntu-static-ip-address/</link><pubDate>Sun, 22 Jun 2014 00:34:51 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/ubuntu-static-ip-address/</guid><description/><content>
&lt;h2 id=&#34;static-ip-configuration-debian-ubuntu&#34;&gt;Static IP Configuration Debian &amp;amp; Ubuntu&lt;/h2&gt;
&lt;h3 id=&#34;edit-etc-network-interfaces&#34;&gt;Edit :/etc/network/interfaces&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;vi /etc/network/interfaces
# The loopback interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.29.29.61
netmask 255.255.255.0
network 10.29.29.0
broadcast 10.29.29.255
gateway 10.29.29.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.29.29.10
# Configuration for eth0 aliases
# This line ensures that the interface will be brought up during boot.
auto eth0:0
# eth0:0
# This is a second IP address.
iface eth0:0 inet static
address 10.30.1.2
netmask 255.255.255.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;restart-networking&#34;&gt;Restart networking:&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;/etc/init.d/networking restart
&lt;/code&gt;&lt;/pre&gt;</content></item><item><title>Kvm and Openvswitch Ubuntu 14</title><link>https://blog.networksec.in/kvm-and-openvswitch-ubuntu-14.04-lts/</link><pubDate>Sat, 22 Mar 2014 00:56:41 +0530</pubDate><author>Vijay Ronan</author><guid>https://blog.networksec.in/kvm-and-openvswitch-ubuntu-14.04-lts/</guid><description/><content>
&lt;h2 id=&#34;update-packages&#34;&gt;Update packages&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;apt-get update &amp;amp;&amp;amp; apt-get upgrade
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;install-packages&#34;&gt;Install Packages&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;apt-get install openvswitch-switch qemu-kvm libvirt-bin
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;ubuntu-box-has-2-nic&#34;&gt;Ubuntu Box has 2 NIC&lt;/h2&gt;
&lt;p&gt;eth0 - only management traffic which is connected to Cisco 3560X port number g0/44
eth1 - Traffic for VM’s(all vlans) - connected to Cisco 3560X port number g0/46&lt;/p&gt;
&lt;h2 id=&#34;cisco-configuration&#34;&gt;Cisco Configuration&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;interface GigabitEthernet0/44
description *** Connected Monitoring02 eth0 ***
switchport access vlan 20
switchport mode access
spanning-tree portfast
interface GigabitEthernet0/46
description *** Connected Monitoring02 eth1 ***
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21-29
switchport mode trunk
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;update-network-configuration-in-ubuntu&#34;&gt;Update network configuration in ubuntu&lt;/h2&gt;
&lt;h3 id=&#34;edit-etc-network-interfaces&#34;&gt;edit /etc/network/interfaces&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;auto lo
iface lo inet loopback
# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.29.20.62
netmask 255.255.255.0
network 10.29.20.0
broadcast 10.29.20.255
gateway 10.29.20.1
dns-nameservers 8.8.8.8
auto eth1
iface eth1 inet manual
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;openvswitch-configuration&#34;&gt;Openvswitch configuration&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;ovs-vsctl add-br ovs-switch ### create bridge name
ovs-vsctl add-port ovs-switch eth1 ### add physical port to bridge
ovs-vsctl show ### check configuration
fdae1b4b-d255-41f2-b764-c535a24f5ccc
Bridge ovs-switch
Port &amp;quot;eth1&amp;quot;
Interface &amp;quot;eth1&amp;quot;
Port ovs-switch
Interface ovs-switch
type: internal
ovs_version: &amp;quot;2.0.2&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Delete default network setting and update,
Here vlan 25, we made it as a default network&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /etc/libvirt/qemu/networks/
root@monitoring:/etc/libvirt/qemu/networks# ls
autostart default.xml
root@monitoring:/etc/libvirt/qemu/networks# &amp;gt; default.xml
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;edit-etc-libvirt-qemu-network-default-xml&#34;&gt;Edit /etc/libvirt/qemu/network/default.xml&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;network&amp;gt;
&amp;lt;name&amp;gt;default&amp;lt;/name&amp;gt;
&amp;lt;forward mode=&#39;bridge&#39;/&amp;gt;
&amp;lt;bridge name=&#39;ovs-switch&#39;/&amp;gt;
&amp;lt;virtualport type=&#39;openvswitch&#39;/&amp;gt;
&amp;lt;portgroup name=&#39;vlan-20&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;20&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-21&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;21&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-22&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;22&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-23&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;23&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-24&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;24&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-25&#39; default=&#39;yes&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;25&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-26&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;26&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-27&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;27&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-28&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;28&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;portgroup name=&#39;vlan-29&#39;&amp;gt;
&amp;lt;vlan&amp;gt;
&amp;lt;tag id=&#39;29&#39;/&amp;gt;
&amp;lt;/vlan&amp;gt;
&amp;lt;/portgroup&amp;gt;
&amp;lt;/network&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;restart-libvirt-bin&#34;&gt;Restart libvirt-bin&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;/etc/init.d/libvirt-bin restart
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;finally-reboot-the-ubuntu-box&#34;&gt;Finally reboot the ubuntu box&lt;/h2&gt;
&lt;h2 id=&#34;vm-guest-install&#34;&gt;VM Guest install&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;virt-install \
--name debian7 \
--ram 1024 \
--disk path=./debian7.img,bus=virtio,size=15 \
--vcpus 2 \
--os-type linux \
--os-variant debianwheezy \
--graphics none \
--console pty,target_type=serial \
--location &#39;http://ftp.us.debian.org/debian/dists/wheezy/main/installer-amd64/&#39; \
--extra-args &#39;console=ttyS0,115200n8 serial&#39;
&lt;/code&gt;&lt;/pre&gt;</content></item></channel></rss>