I have a 3g mobile stick and in certain circumstances I would need to route internet traffic of a PC/server or a particular subnet through this interface. In a windows OS we could simply achieve this by enabling internet sharing on the interface itself. But in the case of ubuntu we can easily enhance ICS (internet connection sharing) feature to a higher level as internet gateway. This way your linux machine can be turned into a gateway which is way cool, isn’t it?
One of the tools in any system engineer’s hand as well as those dealing with customer remote service is to set a remote connection to the other end’s server or PC, through VPN, Public IP or any other possible way. One easy yet effective approach is to establish a ssh tunnel by means of reverse SSH.
Here is a simple, to the point manual on linux iptables:
Port numbers which are recognized by Internet and other network protocols, enabling the computer to interact with others.
Each Linux server has a port number (see /etc/services file). For example:
How To Change Default SSH Port in Ubuntu?
Not everyone has system administrators running around them, to take care that no one hacks their servers and ensure all the updates are up and running.
Packet Tracer 5.3.1
TCPdump is a very powerful command line interface packet sniffer.
It must be launched as root or with superuser rights because of the its use of the promiscuous mode or to be sure to have sufficent privilileges on a network device or a socket.
Wireshark (formerly ethereal) can be used as an alternative to TCPdump but with a GUI interface. Wireshark can be used to read the logs captured by TCPdump too.
refer to this site for more info: http://openmaniak.com/tcpdump.php#tcp_use
To ”’send”’ file or directory ”’to a remote computer”’:
scp -r [/path/filename] [login name@ip address] :
To ”’retrieve”’ file or directory ”’from a remote computer”’ ”’address in your pc”’:
scp -r [login name@ip address] : [/path/filename] [/path/filename]
Here are the meaning of scp command options:
-r — recursively copy entire directory
. — current directory
To copy all txt files in the current directory to your home directory on the destination machine:
scp *.txt 192.168.1.100:
To copy txt files to a destination directory. You have to have write permission on the target directory:
scp *.txt 192.168.1.100:/home/username/directory
To retrieve files from the other machine back to the one you’re on:
scp 192.168.1.100:*.txt /home/support/Desktop
It happens alot that you have an IP device (ATA, door phone, …) and you don’t know the IP address. One easy way is to use nmap.
run this command (on linux of course):
$ nmap -sP <ip range>
eg: nmap -sP 192.168.1.2-50
make sure you run this as root otherwise it will show only ip address without the MAC
you can also save the output into a txt file this way:
eg: nmap -sP 192.168.1.2-50
You can also try using scanssh (next post will cover this)