LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   linux router getting problem (https://www.linuxquestions.org/questions/linux-enterprise-47/linux-router-getting-problem-601602/)

balajimunde 11-22-2007 12:04 AM

linux router getting problem
 
HI,
I would like to make Redhat as a linux router . I tried it but my internal machine is not getting internet connection.
I have braodband connection connected to adsl router and adsl router connected to directly switch.
As a linux router i have done following setting in my lan
#ifconfig eth0 192.168.1.2 up
and gateway for eth0 is 192.168.1.1 i.e routers ip address
#ifconfig eth1 192.168.0.1 up
and gateway is 192.168.1.2 i.e ip address of eth0
the iptables setting like this
vi /etc/sysctl.conf

net.ipv4.ip_forward = 1
:wq
and
# iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
# iptables --append FORWARD --in-interface eth1 -j ACCEPT
These two lan card connected to linux router machine.
now i want to give eth1 IP address to my internal network as a gateway.
But its not working. What i missed so that my machine not work as router.
waiting for reply. Thanks in advance
Balaji mundhe

WAJEDUR REHMAN 11-22-2007 05:33 PM

After editing /etc/sysctl.conf did you run the following command

sysctl -p


All times are GMT -5. The time now is 12:41 AM.