LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2005, 02:02 AM   #1
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Rep: Reputation: 15
Question Linux routing on a dual homed pc


Hi have setup internet sharing on a dual homed pc, but don't no much about routing commands to use. The setup I have is as follows


WWW>>>eth0>>>eth1>>>Switch>>>LOCALNAT COMPS

External: eth0::192.168.1.253/24 Gateway:192.168.1.1
Internal: eth1::192.168.0.254/24 Gateway:192.168.1.253

My local machines can't ping outside. What's amiss? What do I do?
 
Old 06-07-2005, 03:35 AM   #2
abhishek124
LQ Newbie
 
Registered: May 2005
Location: Bangalore,India
Distribution: Red Hat Linux Enterprise 3&4
Posts: 24

Rep: Reputation: 15
ow to enable routing

to enable routing in your PC ,
#vi /etc/sysctl1.conf [change o to 1]
Net.ipv4.ip_forward=1
Then you need to configure squid on your router

vi /etc/squid/squid.conf

http_port =3128
cache_mem=8mb

cache_dir ufs /var/spool/squid 100 16 256

acl localhost src 127.0.0.1/255.255.255.255 ( Change the Ip address to your Internal Ip address)

http_access deny all (Change Deny to Allow)
 
Old 06-08-2005, 03:09 AM   #3
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Re: Linux routing on a dual homed pc

I think I have to clarify. My setup is as follows:

Quote:
Originally posted by friendklay

External: eth0::192.168.1.253/24 Gateway:192.168.1.1
Internal: eth1::192.168.0.254/24 Gateway:192.168.1.253
What I have done so far is execute these in command shell (as suggested by aaa)

Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Code:
iptables -A FORWARD -i eth1 -j ACCEPT
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
However, I can't ping outside. What's wrong? Please help.
 
Old 06-08-2005, 07:45 AM   #4
abhishek124
LQ Newbie
 
Registered: May 2005
Location: Bangalore,India
Distribution: Red Hat Linux Enterprise 3&4
Posts: 24

Rep: Reputation: 15
Please check your gateway its wrong

This Command
echo 1 > /proc/sys/net/ipv4/ip_forward
is for a particular session only, after reboot you need to configure it anyway.
Why are maqurading IP tables.
Do this chkconfig iptables off
service iptables stop
and follow my above configuration
 
Old 06-08-2005, 09:01 AM   #5
abhishek124
LQ Newbie
 
Registered: May 2005
Location: Bangalore,India
Distribution: Red Hat Linux Enterprise 3&4
Posts: 24

Rep: Reputation: 15
to enable routing in your PC ,
#vi /etc/sysctl1.conf [change o to 1]
Net.ipv4.ip_forward=1
Then you need to configure squid on your router

vi /etc/squid/squid.conf

http_port =3128
cache_mem=8mb

cache_dir ufs /var/spool/squid 100 16 256

acl localhost src 127.0.0.1/255.255.255.255 ( Change the Ip address to your Internal Ip address)

http_access deny all (Change Deny to Allow)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
dual homed network cards hrmwinn Linux - Networking 1 08-17-2005 01:51 PM
linux dual homed network cards hrmwinn Linux - Enterprise 1 08-16-2005 04:41 PM
Dual-homed machine gubak Linux - Newbie 4 07-28-2004 01:53 AM
Linux Routing to Multi-Homed Host MightyCranium Linux - Networking 0 03-16-2004 05:14 PM
Dual Homed server / Two ISPs GuitsBoy Linux - Networking 3 01-13-2004 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:10 PM.

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