Skip to contentSkip to conversation

Simplest Routing Question EVER

LARTC Fei Lung [email protected] 3 participants 7 messages Mar 2, 2001 – Mar 3, 2001

lore
Share & tools
lore

Fei Lung [email protected]

author
#0 lore raw

<PRE>This must be the easiest question ever, but I've been stumped for days. I can't seem to get my Linux box to route traffic through to my Win box. What I have is:

T1 Gateway : 100.0.0.1
eth1 (Connected to gateway) : 100.0.0.2
eth2 (Connected to Win) : 100.0.0.3
Win box : 100.0.0.202
(eth0 is connected to DSL, but that doesn't matter for now)

for the rules, I have:

0:       from all lookup local
32766:   from all lookup main
32767:   from all lookup 253

for the routes I have:
100.0.0.202 dev eth2 proto kernel scope link src 100.0.0.3 100.0.0.1 dev eth1 proto kernel scope link src 100.0.0.2 127.0.0.1 dev lo scope link
default via 100.0.0.1 dev eth1

All I'm trying to do is to get the Windows machine to be able to use the Internet. I've read everything I could find, but I can't seem to get it to work. I've tried 'echo 1 &gt; /proc/sys/net/ipv4/ip_forward', flushing the cache, reading the adv routing howto over and over, but I can't seem to get this to work. Any sugestions?

Thanks,
Fei Lung

$ chown flung universe

====================================
Easy and free access to your email anywhere! <A HREF="http://www.starten.net/mail">http://www.starten.net/mail</A>
====================================

</PRE>

#1 lore raw

<PRE>On Fri, Mar 02, 2001 at 05:05:50PM -0500, Fei Lung wrote:
&gt;<i> This must be the easiest question ever, but I've been stumped for </I>&gt;<i> days. I can't seem to get my Linux box to route traffic through </I>&gt;<i> to my Win box. What I have is:
</I>
The problem is that your Windows box doesn't have a publically routable IP address, probably. Search with google.com on 'rusty three line guide masquerading' - this will allow your windows box to roam the internet using the IP address of your gateway.

If you *do* have routable IP addresses for yuur subnet, your gateway needs to know where to send data intended for your subnet. IP is very much a two-way thing.

Regards,

bert

Signature · 6 lines
<A HREF="http://www.PowerDNS.com">http://www.PowerDNS.com</A>      Versatile DNS Services  
Trilab                       The Technology People   
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet


</PRE>
author
#2 lore raw
In reply to Fei Lung [email protected]

<PRE>My Windows box does have a publicly routable IP address. Actually, I have a /24 subnet and I aws just using the windows box to test with before I take the network down to install the machine as a router. In the future, after I get this working, I will add a DSL line to it, but first, I need to get the forwarding working.

Thanks,
Fei Lung

At Friday, 2 March 2001, bert hubert &lt;<A HREF="mailto:[email protected]">[email protected]</A>&gt; wrote:

&gt;<i>On Fri, Mar 02, 2001 at 05:05:50PM -0500, Fei Lung wrote:
</I>&gt;&gt;<i> This must be the easiest question ever, but I've been stumped for </I>&gt;&gt;<i> days. I can't seem to get my Linux box to route traffic through </I>&gt;&gt;<i> to my Win box. What I have is:
</I>&gt;<i>
</I>&gt;<i>The problem is that your Windows box doesn't have a publically routable </I>IP
&gt;<i>address, probably. Search with google.com on 'rusty three line guide </I>&gt;<i>masquerading' - this will allow your windows box to roam the internet </I>using
&gt;<i>the IP address of your gateway.
</I>&gt;<i>
</I>&gt;<i>If you *do* have routable IP addresses for yuur subnet, your gateway </I>needs
&gt;<i>to know where to send data intended for your subnet. IP is very much a </I>&gt;<i>two-way thing.
</I>&gt;<i>
</I>&gt;<i>Regards,
</I>&gt;<i>
</I>&gt;<i>bert
</I>&gt;<i>
</I>&gt;<i>--
</I>&gt;<i><A HREF="http://www.PowerDNS.com">http://www.PowerDNS.com</A> Versatile DNS Services
</I>&gt;<i>Trilab The Technology People
</I>&gt;<i>'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet </I>&gt;<i>
</I>

====================================
Easy and free access to your email anywhere! <A HREF="http://www.starten.net/mail">http://www.starten.net/mail</A>
====================================

</PRE>

#3 lore raw
In reply to Fei Lung [email protected]

<PRE>Fei Lung wrote:
&gt;<i>
</I>&gt;<i> This must be the easiest question ever, but I've been stumped for </I>&gt;<i> days. I can't seem to get my Linux box to route traffic through </I>&gt;<i> to my Win box. What I have is:
</I>&gt;<i>
</I>&gt;<i> T1 Gateway : 100.0.0.1
</I>&gt;<i> eth1 (Connected to gateway) : 100.0.0.2
</I>&gt;<i> eth2 (Connected to Win) : 100.0.0.3
</I>&gt;<i> Win box : 100.0.0.202
</I>&gt;<i> (eth0 is connected to DSL, but that doesn't matter for now) </I>&gt;<i>
</I>&gt;<i> for the rules, I have:

</I>&gt;<i> 0:       from all lookup local
</I>&gt;<i> 32766:   from all lookup main
</I>&gt;<i> 32767:   from all lookup 253

</I>&gt;<i>
</I>&gt;<i> for the routes I have:
</I>&gt;<i> 100.0.0.202 dev eth2 proto kernel scope link src 100.0.0.3 </I>&gt;<i> 100.0.0.1 dev eth1 proto kernel scope link src 100.0.0.2 </I>&gt;<i> 127.0.0.1 dev lo scope link
</I>&gt;<i> default via 100.0.0.1 dev eth1
</I>&gt;<i>
</I>&gt;<i> All I'm trying to do is to get the Windows machine to be able to </I>&gt;<i> use the Internet. I've read everything I could find, but I can't </I>&gt;<i> seem to get it to work. I've tried 'echo 1 &gt; /proc/sys/net/ipv4/ip_forward', </I>&gt;<i> flushing the cache, reading the adv routing howto over and over, </I>&gt;<i> but I can't seem to get this to work. Any sugestions? </I>&gt;<i>
</I>&gt;<i> Thanks,
</I>&gt;<i> Fei Lung
</I>does your win box have your linux box set as it's default gw? can you get any packets through?

What does ipchains -L forward say? does it default to &quot;accept&quot;?

Please give more info, and details on what tests have been tried and failed.

Mike

</PRE>

author
#4 lore raw
In reply to Fei Lung [email protected]

<PRE>I am using kernel 2.4.1. Iptables shows accept for input, forward, output. The Windows machine has the Linux machine as the gateway. &gt;<i>From the windows machine, I can ping the IPs on the linux machine, </I>but I cannot ping the T1 gateway.

&gt;<i>From the linux machine, I can go out the T1. </I>
Thanks,
Fei Lung

At Friday, 02 March 2001, Mike Fedyk &lt;<A HREF="mailto:[email protected]">[email protected]</A>&gt; wrote:

&gt;<i>Fei Lung wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This must be the easiest question ever, but I've been stumped for </I>&gt;&gt;<i> days. I can't seem to get my Linux box to route traffic through </I>&gt;&gt;<i> to my Win box. What I have is:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> T1 Gateway : 100.0.0.1
</I>&gt;&gt;<i> eth1 (Connected to gateway) : 100.0.0.2 </I>&gt;&gt;<i> eth2 (Connected to Win) : 100.0.0.3
</I>&gt;&gt;<i> Win box : 100.0.0.202
</I>&gt;&gt;<i> (eth0 is connected to DSL, but that doesn't matter for now) </I>&gt;&gt;<i>
</I>&gt;&gt;<i> for the rules, I have:

</I>&gt;&gt;<i> 0:       from all lookup local
</I>&gt;&gt;<i> 32766:   from all lookup main
</I>&gt;&gt;<i> 32767:   from all lookup 253

</I>&gt;&gt;<i>
</I>&gt;&gt;<i> for the routes I have:
</I>&gt;&gt;<i> 100.0.0.202 dev eth2 proto kernel scope link src 100.0.0.3
</I>&gt;&gt;<i> 100.0.0.1 dev eth1 proto kernel scope link src 100.0.0.2
</I>&gt;&gt;<i> 127.0.0.1 dev lo scope link
</I>&gt;&gt;<i> default via 100.0.0.1 dev eth1
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> All I'm trying to do is to get the Windows machine to be able to
</I>&gt;&gt;<i> use the Internet. I've read everything I could find, but I can't
</I>&gt;&gt;<i> seem to get it to work. I've tried 'echo 1 &gt; /proc/sys/net/ipv4/ip_forward',
</I>
&gt;&gt;<i> flushing the cache, reading the adv routing howto over and over,
</I>&gt;&gt;<i> but I can't seem to get this to work. Any sugestions?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks,
</I>&gt;&gt;<i> Fei Lung
</I>&gt;<i>does your win box have your linux box set as it's default gw? can
</I>you get any
&gt;<i>packets through?
</I>&gt;<i>
</I>&gt;<i>What does ipchains -L forward say? does it default to &quot;accept&quot;?
</I>&gt;<i>
</I>&gt;<i>Please give more info, and details on what tests have been tried
</I>and failed.
&gt;<i>
</I>&gt;<i>Mike
</I>&gt;<i>
</I>&gt;<i>_______________________________________________
</I>&gt;<i>LARTC mailing list / <A HREF="mailto:[email protected]">[email protected]</A>
</I>&gt;<i><A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A> HOWTO: <A HREF="http://ds9a.">http://ds9a.</A> </I>nl/2.4Routing/
&gt;<i>
</I>

====================================
Easy and free access to your email anywhere! <A HREF="http://www.starten.net/mail">http://www.starten.net/mail</A>
====================================

</PRE>

#5 lore raw
In reply to Fei Lung [email protected]

<PRE>Fei Lung wrote:
&gt;<i>
</I>&gt;<i> I am using kernel 2.4.1. Iptables shows accept for input, forward, </I>&gt;<i> output. The Windows machine has the Linux machine as the gateway. </I>&gt;<i> &gt;From the windows machine, I can ping the IPs on the linux machine, </I>&gt;<i> but I cannot ping the T1 gateway.
</I>&gt;<i>
</I>Whenever I get something like this, I either run ipchains or netfilter with the check command, or add accounting rules and see where the packets stop. The latter is only useful if you can make a rule specific enough to distinguish between other traffic that may go through your firewall.

Please try the accounting rules, and see if you can find where the packets stop.

Mike

</PRE>

#6 lore raw
In reply to Fei Lung [email protected]

<PRE>On Fri, Mar 02, 2001 at 05:40:04PM -0500, Fei Lung wrote:
&gt;<i> My Windows box does have a publicly routable IP address. Actually, </I>&gt;<i> I have a /24 subnet and I aws just using the windows box to test </I>&gt;<i> with before I take the network down to install the machine as a router. </I>&gt;<i> In the future, after I get this working, I will add a DSL line </I>&gt;<i> to it, but first, I need to get the forwarding working. </I>
Run tcpdump on all your interfaces and see where your packets are or aren't going.

regards,

bert

Signature · 6 lines
<A HREF="http://www.PowerDNS.com">http://www.PowerDNS.com</A>      Versatile DNS Services  
Trilab                       The Technology People   
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet


</PRE>