Network & ssh
Accessing remote machines on command line
gateway gateway
Public Network
Private Network Private Network
127.0.0.0/8
Localhost Class A: 10.0.0.0/8
16,777,216
IPv4 Class B: 172.16.0.0/12
address range
Private network
1,048,576
Class C: 192.168.0.0/16
65,536
Public network
Gateway 1-2
Private
Network#3
Gateway 2-3
Private
Private
Network#1
Network#2
Ports IP address
tcp port 22
tcp port 25
tcp port 80 connection
tcp port 443
routing
Ways to gain remote access
●
VPN access
●
ssh tunneling
●
Remote desktop : x2go, rdp, pcoip,
●
Desktop over browser: Apache Guacomole
●
Commercial, over internet : Teamviewer, AnyDesk,
Zoho assist, ...
Some important ports
21 ftp File transfer
22 ssh Secure Shell
25 smtp Simple Mail Transfer Protocol
80 http Hypertext Tranfer Protocol
443 https Secure Hypertext Tranfer Protocol
631 cups Common Unix Printing System
3306 mysql MySQL database
Firewall
●
Ports open on my machine
●
Ports needed to be accessed on remote
machine
●
Network routing over the port
●
Firewall controls at each hop
Protecting a server
Web Network Anonymous
Application Firewall Users
Server with a Filter
public service
SELinux
●
Security Enhanced Linux mode available on Ubuntu too,
apart from server grade flavors like CentOS, Fedora,
RHEL, SuSE Linux etc.,
●
Additional layer of access control on files to services
●
Role Based Access Control
●
Process sandboxing, least privilege access for subjects
● Check using ls -lZ and ps -eZ
SELinux
●
RBAC items: user (unconfined_u), role
(object_r), type (user_home_t), level (s0)
●
Modes: disabled, enforcing, permissive
●
Tools: semanage, restorecon
SELinux is recommended for all publicly visible servers
Network tools
ping To see if the remote machine is up
traceroute Diagnostics the hop timings to the remote machine
nslookup Ask for conversion of IP address to name
dig DNS lookup utility
netstat Print network connections
mxtoolbox.com For help with accessibility from public network
whois lookup Who owns which domain name
nmap (careful !) Network port scanner
wireshark (careful !) Network protocol analyzer
High Performance Computing
● Look at www.top500.org for statistics
●
Accessing a remote HPC machine is usually over SSH
●
Long duration jobs are submitted to a job scheduler for
execution
●
Raw data if large needs to be processed remotely before being
transferred to your machine (network charges? bandwidth?)
●
Comfort with command line is a must