Networking Forums

Networking Forums > Computer Networking > Linux Networking > debian [testing/etch] redirected broadcasts not working

Reply
Thread Tools Display Modes

debian [testing/etch] redirected broadcasts not working

 
 
mabra
Guest
Posts: n/a

 
      02-18-2007, 08:28 PM
Hi All!

I am struggling with ipfilters to redirect broadcast from the internet
into my LAN, which I need for Wake On LAN(WAN). I have just moved from
NetBSD to Debian and have set it up to be a router, which does well. I
am new to ipfilters, but I got all of my nat-based redirects of ports
running, except this one:

iptables -t nat -A PREROUTING -i $EXTIF -p udp --dport 8888 -j DNAT --to
192.168.26.255

This is syntactically accepted by ipfilters, but there are no redirected
packages in the LAN, which I track with tcpdump. The packages reach my
public interface, but not more. In NetBSD, I had to set the kernel
variable "net.inet.ip.directed-broadcast" to allow the redirected
broadcast. After long serches, I discovered
"net.ipv4.ip_echo_ignore_broadcasts" for Debian from a posting. But if I
try to set this variable, I get only "unknown key" [I use "sysctl -w
....] as an error message.

Is this a limitation to the testing version, or am I completely wrong
with my attempt?
Any help would be great!

Best regards,
Manfred
 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      02-18-2007, 10:52 PM
Hello,

mabra a écrit :
>
> I am struggling with ipfilters to redirect broadcast from the internet
> into my LAN, which I need for Wake On LAN(WAN). I have just moved from
> NetBSD to Debian and have set it up to be a router, which does well. I
> am new to ipfilters, but I got all of my nat-based redirects of ports
> running, except this one:
>
> iptables -t nat -A PREROUTING -i $EXTIF -p udp --dport 8888 -j DNAT --to
> 192.168.26.255
>
> This is syntactically accepted by ipfilters, but there are no redirected
> packages in the LAN, which I track with tcpdump. The packages reach my
> public interface, but not more.


The incoming packet is DNATed into the broadcast address in the
PREROUTING chain, and then reaches the input routing stage. But in
accordance with RFC 2644 broadcast packets are not forwarded, so the
packet is dropped.

> In NetBSD, I had to set the kernel
> variable "net.inet.ip.directed-broadcast" to allow the redirected
> broadcast.


I am not aware of any such option in the Linux kernel.
For WoL, there are workarounds based on static ARP entries to avoid
using an IP broadcast.

> After long serches, I discovered
> "net.ipv4.ip_echo_ignore_broadcasts" for Debian from a posting. But if I
> try to set this variable, I get only "unknown key" [I use "sysctl -w
> ...] as an error message.


1) It is not ip_echo_ignore_broadcasts but icmp_echo_ignore_broadcasts.
2) It is not Debian specific, it is in the Linux kernel.
3) It has nothing to do with forwarding broadcast packets. It has to do
with accepting and replying to ICMP echo requests ("ping") sent to a
local broadcast address or not.
 
Reply With Quote
 
mabra
Guest
Posts: n/a

 
      02-19-2007, 05:59 AM
Hello !

Thanks for your answer.
I know, that there are the kernel vars for icmp, but I found the other
one in a posting in the net. Using static ARP entries, how to do that?

I think, this would be completely inprakticable for a usual LAN, may be
for one or two computers. I used this technic in my companies WAN to
manage administrative workstations and it worked well.

With my NetBSD, it worked always. I am frustrated. RFC 2644 also notes,
that a router "may have the option to enable this feature".

Thanks first,
Manfred

Pascal Hambourg wrote:
> Hello,
>
> mabra a écrit :
>>
>> I am struggling with ipfilters to redirect broadcast from the internet
>> into my LAN, which I need for Wake On LAN(WAN). I have just moved from
>> NetBSD to Debian and have set it up to be a router, which does well. I
>> am new to ipfilters, but I got all of my nat-based redirects of ports
>> running, except this one:
>>
>> iptables -t nat -A PREROUTING -i $EXTIF -p udp --dport 8888 -j DNAT
>> --to 192.168.26.255
>>
>> This is syntactically accepted by ipfilters, but there are no
>> redirected packages in the LAN, which I track with tcpdump. The
>> packages reach my public interface, but not more.

>
> The incoming packet is DNATed into the broadcast address in the
> PREROUTING chain, and then reaches the input routing stage. But in
> accordance with broadcast packets are not forwarded, so the
> packet is dropped.
>
>> In NetBSD, I had to set the kernel variable
>> "net.inet.ip.directed-broadcast" to allow the redirected broadcast.

>
> I am not aware of any such option in the Linux kernel.
> For WoL, there are workarounds based on static ARP entries to avoid
> using an IP broadcast.
>
>> After long serches, I discovered "net.ipv4.ip_echo_ignore_broadcasts"
>> for Debian from a posting. But if I try to set this variable, I get
>> only "unknown key" [I use "sysctl -w ...] as an error message.

>
> 1) It is not ip_echo_ignore_broadcasts but icmp_echo_ignore_broadcasts.
> 2) It is not Debian specific, it is in the Linux kernel.
> 3) It has nothing to do with forwarding broadcast packets. It has to do
> with accepting and replying to ICMP echo requests ("ping") sent to a
> local broadcast address or not.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Debian Etch and NTP Àngel Català Linux Networking 22 04-11-2008 02:21 PM
Problems with two network cards on Debian Etch bisbar@gmail.com Linux Networking 4 07-07-2007 08:35 AM
Problem with inews on Debian etch Laurens Kils-Huetten Linux Networking 0 06-21-2007 06:25 PM
Problem with dns in Debian Etch cantabile Linux Networking 0 05-18-2007 10:10 PM
Debian Etch, DEC 21041 NIC chip set Dave Boland Linux Networking 1 05-12-2007 07:31 PM



1 2 3 4 5 6 7 8 9 10 11