Re: NAT to a broadcast addess using iptables?
- From: Pascal Hambourg <boite-a-spam@xxxxxxxxxxxxxxx>
- Date: Mon, 27 Nov 2006 18:00:08 +0100
Hello,
news@xxxxxxxxxxxxxxxxxx a écrit :
I'm an iptables newbie. I have a busybox router that uses iptables
1.2.8. (Sorry if I have the wrong ng, but this seems to be where the
iptables gurus are!)
Oh, so you're looking for iptables gurus... then don't bother to read my reply.
I have a requirement to be able to send a packet
across the internet and have it natted and forwarded to a directed
broadcast address on the internal lan, e.g. UDP 213.1.2.3:9 -->
10.1.2.255/24:9. I've added the PREROUTING and FORWARDING rules which
nat and foward to the broadcast address but a sniffer shows the packet
not arriving. If I change both rules to a specific host (e.g.
10.1.2.1), it works fine. Is what I'm trying to do possible?
Netfilter/iptables itself does not care whether an IP addresse is a broadcast or unicast address (which can cause trouble with connection tracking). But in the Linux kernel IP stack, the DNAT operation in the PREROUTING chain takes place before the input routing decision is taken. So the input routing algorithm receives a packet with a broadcast destination address, but it won't forward such packets. Broadcast packets can only be sent or received locally, not forwarded.
(Yes, I know it's insane, but is it possible!?)
I'm afraid it is not possible to do this with iptables. Is your goal to do some kind of remote wake-on-LAN ?
.
- Follow-Ups:
- References:
- NAT to a broadcast addess using iptables?
- From: news
- NAT to a broadcast addess using iptables?
- Prev by Date: NAT to a broadcast addess using iptables?
- Next by Date: Re: NAT to a broadcast addess using iptables?
- Previous by thread: NAT to a broadcast addess using iptables?
- Next by thread: Re: NAT to a broadcast addess using iptables?
- Index(es):
Relevant Pages
|