Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
If you want to monitor a specific tcp port on Icinga2 you just need to add another tcp variable:
object Host "host-web" {
import "generic-host-tpl"

address = "YOUR_SERVER_IP_ADDRESS"
vars.os = "Linux"

vars.tcp["OPTIONAL_NAME"]={
tcp_port=8181
}

Here in above sample we are monitoring port 8181 of host-web which has the IP address of YOUR_SERVER_IP_ADDRESS (change it to your server ip address remote or local).

#linux #monitoring #sysadmin #icinga2 #host #tcp #port
nmap (Network Mapper) is a security scanner, originally written by Gordon Lyon.

Nmap features include:
Host discovery – Identifying hosts on a network. For example, listing the hosts that respond to TCP and/or ICMP requests or have a particular port open.

Port scanning – Enumerating the open ports on target hosts.

Version detection – Interrogating network services on remote devices to determine application name and version number.[7]

OS detection – Determining the operating system and hardware characteristics of network devices.

Scriptable interaction with the target – using Nmap Scripting Engine[8] (NSE) and Lua programming language.

If you want to check whether a port on remote host is open:
sudo nmap -v -p 80 google.com

In response it shows that the port is open/closed/filtered:
Not shown: 987 filtered ports
20/tcp closed ftp-data
80/tcp open http

In case you want to scan all port using nmap:
sudo nmap -v your_target_victim.com

It lists all the gathered information about open ports.

#nmap #security #port #open #open_port #port_scanner
Running Metabase on another port

By default Metabase will launch on port 3000, but if you prefer to run the application on another port you can do so by setting the following environment variable:

export MB_JETTY_PORT=3500
java -jar metabase.jar

In this example once the application starts up you will access it on port 3500 instead of the default port of 3000.


#metabase #port #jetty_port
Access an application on remote machine without having access to the port from your browser. Sometimes when there is firewalls that block all ports to the outside world or any other reasons, you can to port forwarding from remote machine to local machine in order to be abke to see the application UI. For solving this problem you can use ssh for port forwarding:

ssh -L 5601:localhost:8085 YOUR_HOST

This allows anyone on the remote server to connect to TCP port 5601 on the remote server. The connection will then be tunneled back to the client host, and the client then makes a TCP connection to port 8085 on localhost. Any other host name or IP address could be used instead of localhost to specify the host to connect to.

Now if you head over to your browser you can enter URL localhost:8085 to see the remote application.

#linux #ssh #port_forwarding #forwarding #remote_forwarding
With mysqldump you can export databases. with --port parameter you can specify which port it should connects. If you provide localhost for --host parameter, mySQL will use sockets and port will be ignored.

So be careful with it!

#mysql #mysqldump #port #port_ignorance #3306 #backup #database_backup #sockets #ip_address #localhost
ngrok something that ROCKS and is priceless!

As ngrok itself says:

Public URLs for exposing your local web server

Have you had an experience of when you need to test a tool and the 3rd party needs you to give a public accessible URL? Well, what would you do when you are developing a project on your PC, Laptop? You don't have any URL to give to 3rd party tools. Here ngrok truely rocks!

Downlaod it from the URL below:

https://ngrok.com/

And extract the download binay for your OS. In order to run the ngrok just do like below:

./ngrok http 5000


The above command will output some data and a part which is Forwarding for http and https:

Forwarding                    http://76eec0f8.ngrok.io -> localhost:5000
Forwarding https://76eec0f8.ngrok.io -> localhost:5000

The URL 76eec0f8.ngrok.io is the part that you will give to the 3rd party. and all the other part of the URL path will be forwarded
to port 5000 on your local server.

Yes, I know it's like a magic.

#ngrok #port #http #ngrok_io