Using iptables for forward some packets

Bob Edwards Robert.Edwards at anu.edu.au
Tue Jul 2 10:32:14 EST 2002


Michael Still wrote:
> 
> Hello.
> 
> I am having iptables confusion issues. I have a packet (a DHCP request in
> this case). The packet arrives on my firewall on wlan0, and I want to push
> it straight out eth0. I then need to push the response back the same
> way...
> 
> I have:
> 
> echo "Forwarding selected wireless packets"
> iptables -A FORWARD -i wlan0 -o eth0 -p udp --dport 67 -j ACCEPT
> iptables -A FORWARD -i eth0 -o wlan0 -p udp --dport 67 -s 172.31.0.50/32 -j ACCEPT
> 
> And I'm proud to say it doesn't work. Can I have a hint please?
> 
> Mikal
> 

You might want to run dhcrelay (man dhcrelay(8)) on your router as I
don't think that your router is likely to want to forward the DHCP
request packets (which are broadcasts) onto the other subnet.

Cheers,

Bob Edwards.




More information about the linux mailing list