Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: Plz i need help.... or i ll be fired :(
@ 2005-09-28 11:51 Derick Anderson
  0 siblings, 0 replies; 31+ messages in thread
From: Derick Anderson @ 2005-09-28 11:51 UTC (permalink / raw)
  To: Nick Taylor, netfilter

 

> -----Original Message-----
> From: Nick Taylor [mailto:nickt@lightlink.com] 
> Sent: Tuesday, September 27, 2005 6:30 PM
> To: Derick Anderson
> Cc: Alaios; netfilter@lists.netfilter.org
> Subject: RE: Plz i need help.... or i ll be fired :(
> 
> <-------removed on topic discussion to rant off topic------>
> 
> > Your internet address is 143.233.222.77 and your network mask is 
> > 255.255.255.192. That 192 means you only have 64 IPs in 
> your network. 
> > If you don't believe me then google CIDR masks for yourself 
> like I did 
> > a couple years back. Now supposing that your network address is
> > 143.233.222.76 (and it is probably 143.233.222.64), you run 
> out of IPs 
> > at 143.233.222.139, which is your network's default 
> broadcast address.
> > This is quite far away from 143.233.222.253 so your packet 
> never gets 
> > to the intended host.
> >
> 
> So many people can't understand binary, and it's statements 
> like the one above that make this so confusing for people.  
> There's no such thing as a "network address" that doesn't 
> fall on a subnet boundry.  The math is so simple, please try 
> to understand, it will make the world a better place:

Apologies for not being more precise in my post. I was 99% sure of what
you just said but figured an in-depth discussion of CIDR masks was
overkill - having said that you've provided a more complete and
understandable explanation than I probably would have.


^ permalink raw reply	[flat|nested] 31+ messages in thread
* RE: Plz i need help.... or i ll be fired :(
@ 2005-09-27 21:04 Derick Anderson
  2005-09-27 22:29 ` Nick Taylor
  0 siblings, 1 reply; 31+ messages in thread
From: Derick Anderson @ 2005-09-27 21:04 UTC (permalink / raw)
  To: Alaios, netfilter

Comments inline, consider not top-posting, it makes reading so much
easier...

> -----Original Message-----
> From: netfilter-bounces@lists.netfilter.org 
> [mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Alaios
> Sent: Tuesday, September 27, 2005 4:24 PM
> To: John A. Sullivan III
> Cc: netfilter@lists.netfilter.org
> Subject: Re: Plz i need help.... or i ll be fired :(
> 
> Its not on a different network.. eth1 is directly connected 
> with this network

But it is on a different network.

> 
> "John A. Sullivan III" <jsullivan@opensourcedevel.com> wrote:
> What is the default gateway for the laptop? How does it get to
> 143.233.222.253 since that is on a different network? - John
> 
> On Tue, 2005-09-27 at 09:52 -0700, Alaios wrote:

Notice that our target host is 143.233.222.253.

[eth0 snipped]
 
> > eth1 Link encap:Ethernet HWaddr
> > 00:02:2D:3B:1D:96
> > inet addr:143.233.222.77
> > Bcast:255.255.255.255 Mask:255.255.255.192

[non-essential stuff snipped]

Your internet address is 143.233.222.77 and your network mask is
255.255.255.192. That 192 means you only have 64 IPs in your network. If
you don't believe me then google CIDR masks for yourself like I did a
couple years back. Now supposing that your network address is
143.233.222.76 (and it is probably 143.233.222.64), you run out of IPs
at 143.233.222.139, which is your network's default broadcast address.
This is quite far away from 143.233.222.253 so your packet never gets to
the intended host.

[lo snipped]

> > Kernel IP routing table
> > Destination Gateway Genmask Flags
> > Metric Ref Use Iface
> > 143.233.222.64 0.0.0.0 255.255.255.192 U 0 0 0 eth1 
> 10.0.0.0 0.0.0.0 
> > 255.0.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

[A ton of stuff snipped]

Notice your first routing entry there, which has the same netmask ending
in 192. When a packet comes to your router, the router looks through all
the entries for a matching subnet. It sees 143.233.222.253 is the
destination IP, and looks at 143.233.222.64/255.255.255.192. Since (as I
suspected earlier), your subnet starts with .64, your IP range ends at
.127, not .255. Your router says, "Well we can't use that route", so it
checks the next one, which also does not match, and finally the last
entry, which also does not match. Having no default gateway, it discards
the packet and moves on.

iptables is not the issue - it is a routing problem. Either put the host
between .65 and .126 (.64 is your network address and .127 is supposed
to be broadcast), or change your routing table/network setup so you've
got a 255.255.255.0 network instead of a 255.255.255.192.

Derick Anderson


^ permalink raw reply	[flat|nested] 31+ messages in thread
[parent not found: <65aa6af905092708427ab4dbb1@mail.gmail.com>]
* Plz i need help.... or i ll be fired :(
@ 2005-09-27 14:57 Alaios
  2005-09-27 15:03 ` Sp0oKeR
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Alaios @ 2005-09-27 14:57 UTC (permalink / raw)
  To: netfilter, alaios

Hi plz take a look at the following example

The laptop has 2 ethernet interfaces
To eth1 comes traffic from src 143.233.222.253
The eth0 has ip address 10.2.4.2 and it is connected
back to back with eth1 of other pc with ip address
10.2.4.1
I want to forward the traffic with src 143.233.222.253
to the 10.2.4.1 pc and if it works i will redo this
for a second pc so as to l send the traffic to a third
on.
Can u help me plz?

I have tried this one
iptables -t nat -A PREROUTING -i eth1 -s
143.233.222.253 -j DNAT --to-destination 10.2.4.1
i have also set the
/proc/sys/net/ipv4/ip_forward to 1
but still i cant see any trafiic to eth0 interface (ip
10.2.4.2)


I have also tested this one
iptables -t nat -A PREROUTING -p tcp -d 143.233.222.77
(laptop eth1 card) --dport 22453 (i have cheched dst
port with tcpdump) 00 -j DNAT --to-destination
10.2.4.1
this still doesnt work
Every time i try to apply a new rule i use first
the iptables -F
iptables -t nat -F command





		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2005-09-28 11:51 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050927154040.23330.qmail@web54709.mail.yahoo.com>
2005-09-27 16:19 ` Plz i need help.... or i ll be fired :( John A. Sullivan III
2005-09-27 16:35   ` Alaios
2005-09-27 16:42     ` Edmundo Carmona
2005-09-27 16:52       ` Alaios
2005-09-27 16:59         ` Edmundo Carmona
2005-09-27 17:08           ` Edmundo Carmona
2005-09-27 17:15             ` John A. Sullivan III
2005-09-27 17:10         ` John A. Sullivan III
2005-09-27 17:14           ` Edmundo Carmona
     [not found]             ` <20050927202213.70086.qmail@web54701.mail.yahoo.com>
2005-09-27 20:46               ` Edmundo Carmona
2005-09-27 20:55                 ` John A. Sullivan III
2005-09-27 20:24           ` Alaios
2005-09-27 20:54             ` John A. Sullivan III
2005-09-28 11:51 Derick Anderson
  -- strict thread matches above, loose matches on Subject: below --
2005-09-27 21:04 Derick Anderson
2005-09-27 22:29 ` Nick Taylor
2005-09-27 23:32   ` Edmundo Carmona
2005-09-28  0:06     ` Seferovic Edvin
     [not found] <65aa6af905092708427ab4dbb1@mail.gmail.com>
     [not found] ` <20050927154321.68035.qmail@web54710.mail.yahoo.com>
2005-09-27 15:46   ` Edmundo Carmona
2005-09-27 14:57 Alaios
2005-09-27 15:03 ` Sp0oKeR
2005-09-27 15:14 ` John A. Sullivan III
2005-09-27 15:20   ` Alaios
2005-09-27 15:36     ` John A. Sullivan III
2005-09-27 15:22   ` John A. Sullivan III
2005-09-27 15:30     ` Alaios
2005-09-27 15:38       ` John A. Sullivan III
2005-09-27 15:18 ` Jörg Harmuth
2005-09-27 15:34   ` Alaios
2005-09-27 15:58     ` John A. Sullivan III
2005-09-27 15:38   ` Alaios

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox