RE: Forward UDP broadcast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Rommy Taslim [mailto:rommyt@xxxxxxxxxxxxxxxxxxxxxxxx]
> Sent: Monday, June 02, 2003 11:29 PM
> To: netfilter@xxxxxxxxxxxxxxxxxxx
> Subject: Forward UDP broadcast
> 
> 
> Hi,
> 
> Anyone knows how to forward UDP broadcast using iptables ?
> I need to do something like ipportfw does:
> ipportfw -A -u 192.168.4.255/699 -R 192.168.2.255/699
> 
> which forward all the broadcast on network 4 for port 699 to 
> network 2.
> 
> I have something like this for iptables:
> 
> iptables -t nat -A PREROUTING -p udp \
>         -d 192.168.4.255 --dport 699 \
>         --to-destination 192.168.2.255:699
> 
> But it didn't work.
> 
> Anyone can give me some pointers ??
> 
> Thanks in advance.
> 
> Rommy

This works for me:
EXTIP=External IP address
PORTFWIP=IP address to forward to

# Service at port 645 udp
$IPTABLES -A FORWARD -i eth0 -o eth1 -p udp --dport 645 -j ACCEPT
$IPTABLES -A PREROUTING -t nat -p udp -d $EXTIP --dport 645 \
  -j DNAT --to $PORTFWIP:645

Vilmos


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux