how do you configure linux system as a router?

Answers were Sorted based on User's Feedback



how do you configure linux system as a router?..

Answer / anoop

above anwser also write,
but must me know this,

vi /etc/sysctl.conf


# Controls IP packet forwarding
net.ipv4.ip_forward = 1

save &

sysctl -p

Is This Answer Correct ?    39 Yes 0 No

how do you configure linux system as a router?..

Answer / thilak.r.s

Give the following command

echo 1 > /proc/sys/net/ipv4/ip_forward


Is This Answer Correct ?    15 Yes 5 No

how do you configure linux system as a router?..

Answer / bhupendra singh jhala

follow following command

1.) vi /etc/sysctl.conf

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

save (:wq!)

You should have a Two physical LAN card, if You have't two
Lan cat. You have to creat virtual Lan card

2.) cp -arvf /etc/sysconfig/network-scripts/ifcfg-
eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1

3.) Set a diffrent Class IP in virtual Lan card

4.) start network service
/etc/init.d/network restart

Is This Answer Correct ?    7 Yes 1 No

how do you configure linux system as a router?..

Answer / anindian

1st answer is correct till you boot your Linux machine, once
rebooted, its gone coz the /proc is a fs that is resident on
memory, thus if you want to forward your packets permanently
then you have to alter the net.ipv4.ip_forward parameter to
reflect the changes each time machine is booted. # sysctl -p
makes it effective without reboot.

Is This Answer Correct ?    4 Yes 2 No

how do you configure linux system as a router?..

Answer / mahendra yadav

iptables -I FORWARD -i eth0 -o eth1 -j ACCEPT

iptables -I FORWARD -i eth1 -o eth0 -j ACCEPT

vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
:wq

/etc/init.d/iptables save

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Linux Commands Interview Questions

My machine is running half duplex mode how to change half duplex to full duplex?

4 Answers   Oracle,


A file which is not deleted by normal user and also root (using rm), for that type of file how we delete it?

5 Answers   CTS,


How do I find command history in linux?

0 Answers  


What is cd command used for?

0 Answers  


What does top do in linux?

0 Answers  






1.what is Kernel parameters? 2.how many cpu have use in your machine?

3 Answers   ConSim,


What is Data Command?

0 Answers  


What is cat command in linux?

0 Answers  


What command would you use to create an empty file without opening it to edit it?

0 Answers  


What is df -h command?

0 Answers  


You wish to restore the file memo.ben which was backed up in the tarfile mybackup.tar. What command should you type?

0 Answers  


what is the roles and responsibilities in linux system admin having 2yrs exp..?

0 Answers   HCL, RNF Technologies,


Categories