LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-22-2007, 12:04 AM   #1
balajimunde
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
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
 
Old 11-22-2007, 05:33 PM   #2
WAJEDUR REHMAN
Member
 
Registered: Aug 2007
Posts: 43

Rep: Reputation: 15
After editing /etc/sysctl.conf did you run the following command

sysctl -p
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux router problem rogk Linux - Networking 5 01-27-2006 11:12 AM
linux router problem dawn_angel Linux - Networking 7 02-07-2005 02:26 PM
Linux Router problem makapacs Linux - Networking 3 07-01-2004 03:11 AM
linux router problem(HELP ME OUT) bally Linux - Networking 5 06-21-2002 08:26 AM
Linux Router problem kjelle Linux - Networking 2 02-04-2002 07:32 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration