how do you configure linux system as a router?
Answers were Sorted based on User's Feedback
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 |
Answer / thilak.r.s
Give the following command
echo 1 > /proc/sys/net/ipv4/ip_forward
Is This Answer Correct ? | 15 Yes | 5 No |
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 |
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 |
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 |
What is the difference between kill and kill -9 commands?
What would you do when all the processess hangs and there is no other option in unix?
Which are the linux directory commands?
what is work of dns
To move /home/ben/memos dir in /home/bob/memos, what is the result by mv /home/ben/memos /home/bob
What is top command in linux?
What is makefile in unix?
How do I find the console in linux?
What is umask 000?
Suppose I lost a root password and I need to give it, I treid to change it through single usermode even though I am not get a password, then what is the otherprocedure to give a root password?
what are the features of Linux?
What is make in linux?