debian [testing/etch] redirected broadcasts not working

This is a discussion on debian [testing/etch] redirected broadcasts not working within the Linux Networking forums, part of the Linux Forums category; Hi All! I am struggling with ipfilters to redirect broadcast from the internet into my LAN, which I need for ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2007
mabra
 
Posts: n/a
Default debian [testing/etch] redirected broadcasts not working

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
  #2 (permalink)  
Old 02-19-2007
Pascal Hambourg
 
Posts: n/a
Default Re: debian [testing/etch] redirected broadcasts not working

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
  #3 (permalink)  
Old 02-19-2007
mabra
 
Posts: n/a
Default Re: debian [testing/etch] redirected broadcasts not working

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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0