in Linux by
How can we make a router with the help of Linux Computer?

1 Answer

0 votes

You may generally come across this type of questions in Linux interview. Linux machine has the ability to turn it into a router with the help of IP Masquerade. You may have seen the servers found in commercial firewalls. IP Masquerade does the same function to one-to-many Network Address Translation servers. If the internal computers do not have the IP address then in this case, IP Masquerade can connect to the other internal computers which are connected to Linux box to access the internet.

Make a router with the help of Linux Computer

Just follow these steps to enable IP Masquerade Linux:

Connect your PC to LAN.

This PC can be used as a default gateway for other systems for TCP/IP networking. You can use the same DNS on all other systems.

Go in the Kernel and enable IP forwarding. You can also enable IP forwarding using the command: /etc/rc.d/rc.local file on rebooting the system.

The last step is to run this command which sets up the rules to masquerade: /sbin/iptables