# ipfw udp forward



## graudeejs (Apr 19, 2011)

`# ipfw add fwd $ROOT_IP,domain ip from any to $SHARE1_IP domain keep-state`

I don't understand why this rule works for TCP and doesn't seem to work for UDP.

DNS replies to
`$ dig +tcp +short @$SHARE1_IP some_domain_name`
but it doesn't for
`$ dig +short @$SHARE1_IP some_domain_name`

Dig works fine for $ROOT_IP.

$SHARE1_IP and $ROOT_IP are on same host.


----------



## vivek (Apr 25, 2011)

What error or message you see from dig? Try adding +trace 


```
dig +trace +short @$SHARE1_IP some_domain_name
```


----------



## terminus (May 10, 2011)

May be it is related to bug/feature of IPFW fwd + keep-state
http://nuclight.livejournal.com/124348.html


> 2. Ð”Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐµÑÐºÐ¸Ðµ Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð° Ð¸ ipfw fwd; Ñ‚ÐµÐ³Ð¸.


----------



## graudeejs (May 10, 2011)

Thanks for links, I will check it in day or two.. and will take a closer look at this behaviour.


----------

