LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-21-2004, 06:18 PM   #1
ad3
LQ Newbie
 
Registered: Jan 2004
Location: Tampa
Distribution: RedHat, Suse, Slackware
Posts: 16

Rep: Reputation: 0
Routing, IP Masquerading and Cable Modem


Although I went to school for Linux, experience is where its at.

hey guys i was wondering if you could shed some light on a problem i am having, i am pretty close but i am unable to get a linux box i am trying to use as a router/fw.

I am using redhat 9.1 box with dual nics, eth0 uses dhcp, and eth1 has a private 192.168.1.x ip address. The other machine, a laptop redhat 7.3x is connected via x-over cable to eth1 of the router/gw.

I am using iptables (not sure how well though) and have enabled port fowarding.

I am able to ping each machine and the router/fw can ping the internet.

My isp is roadrunner and i think i should be using IP masq enabled via NAT, but not sure of the -to ip address i should be using?

If i use roadrunner's assigned ip 24.161.232.x i get an invalid argument.

I can run traceroutes from eth1 of the router/fw to the laptops eth0 and vice-versa, if i try pinging the internet from the laptop , i get unknown host, also cannot ping an internet site.

I have also added to the /etc/resolv.conf file in the laptop to use roadrunner's nameservers. What am i doing wrong?

Should i be setting up eth0 on the router/fw to be static and then use dhcpd to handle the ip to the Internet?

Last edited by ad3; 01-21-2004 at 06:22 PM.
 
Old 01-21-2004, 07:33 PM   #2
krazeivan
LQ Newbie
 
Registered: Sep 2003
Location: Cheyenne, Wyoming
Posts: 5

Rep: Reputation: 0
have you tried
#route add -net default gw 192.168.1.x netmask 0.0.0.0 metric 1
on the laptop?
 
Old 01-21-2004, 08:35 PM   #3
ad3
LQ Newbie
 
Registered: Jan 2004
Location: Tampa
Distribution: RedHat, Suse, Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
no i have not i can post my router/fw route table also if it will help.
thanks for the reply.

this is the router/fw route table:

Destination Gateway Genmask Flags Metric Ref Use Iface
24.73.50.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 24.73.50.1 0.0.0.0 UG 0 0 0 eth0

here is ifconfig's output:

eth0 Link encap:Ethernet HWaddr
inet addr:24.73.51.216 Bcast:255.255.255.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2828 errors:0 dropped:0 overruns:0 frame:0
TX packets:355 errors:0 dropped:0 overruns:0 carrier:0
collisions:5 txqueuelen:100
RX bytes:305442 (298.2 Kb) TX bytes:53509 (52.2 Kb)
Interrupt:9 Base address:0xe800

eth1 Link encap:Ethernet HWaddr
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3120 (3.0 Kb) TX bytes:480 (480.0 b)
Interrupt:10 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2311 errors:0 dropped:0 overruns:0 frame:0
TX packets:2311 errors:0 dropped:0 overruns:0 carrier:0

Last edited by ad3; 01-21-2004 at 10:34 PM.
 
Old 01-21-2004, 09:15 PM   #4
krazeivan
LQ Newbie
 
Registered: Sep 2003
Location: Cheyenne, Wyoming
Posts: 5

Rep: Reputation: 0
type this as root
route add -net default gw 192.168.1.x netmask 0.0.0.0 metric 1

see if that works :-)
 
Old 01-28-2004, 12:01 PM   #5
ad3
LQ Newbie
 
Registered: Jan 2004
Location: Tampa
Distribution: RedHat, Suse, Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
i'll figure it out from http://linux-ip.net

now that i am looking at it;
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
is using a default route (0.0.0.0), i may want to use a static route instead.
 
Old 02-09-2004, 11:26 AM   #6
ad3
LQ Newbie
 
Registered: Jan 2004
Location: Tampa
Distribution: RedHat, Suse, Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Routing Sucess

After a week of tinkering and reading, i figured out how to set up a linux box to act as a fw/router using ip masquerading. Thanks to those who offered help.

Anyone who comes across this article and has any questions, perhaps i will be able to offer some assistance.
 
Old 02-24-2004, 08:50 PM   #7
dude_228
Member
 
Registered: Dec 2002
Posts: 37

Rep: Reputation: 15
Re: Routing Sucess

Quote:
Originally posted by ad3
After a week of tinkering and reading, i figured out how to set up a linux box to act as a fw/router using ip masquerading. Thanks to those who offered help.

Anyone who comes across this article and has any questions, perhaps i will be able to offer some assistance.
Hey
Good job you got it working. I am really trying out the ip mastequerading, but all these guides seem long and confusing. Is there any actual file or commands to use to get it trying fast with iptables.
Thanks
 
Old 02-25-2004, 07:48 AM   #8
ad3
LQ Newbie
 
Registered: Jan 2004
Location: Tampa
Distribution: RedHat, Suse, Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
i don't understand what yor saying in this sentence "to get it trying fast with iptables"

If your are referring to a setting up iptables with minimial amount of security, that can be possible (although not suggested). I can post a firewall script that i basically pieced together from my research and reading
books and articles.
 
  


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
samba and ip masquerading = iptable/routing conflict? wlfdgcrkz Linux - Software 5 04-26-2003 03:11 PM
router not routing/masquerading. Why? Pcghost Linux - Networking 1 03-24-2003 10:30 AM
masquerading / routing /firewall issue? VultureCulture Linux - Networking 2 10-04-2002 11:47 AM
IP MAsquerading /Routing Problem krpotdar Linux - Networking 0 09-27-2001 06:36 AM
Trouble re: routing table & cable modem sharing jroger Linux - Networking 4 07-15-2001 05:20 PM

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

All times are GMT -5. The time now is 08:46 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