Networking Archive

Redirect one port to another port using iptables

You can easily redirect incoming traffic by inserting rules into PREROUTING chain of the nat table. You can set destination port using the REDIRECT target. Following is the procedure: Use the following for redirecting TCP traffic from one SRC_PORT to DEST_PORT: Use the following for redirecting UDP traffic from one SRC_PORT to DEST_PORT: Use the

How to assign static ip in Ubuntu from terminal

To assign static ip in Ubuntu from terminal, follow this procedure: # First open the interfaces file by using any editer of your choice, like below $ sudo vi /etc/network/interfaces # Now add the following lines in above file with your desired ip values autho eth0