# iptables to pf conversion



## drcabrejos (Apr 16, 2012)

All,

I've been having some problems converting some commands from iptables to pf.

Can someone help me with this conversion.


```
iptables -A FORWARD -o $tundev -j ACCEPT
iptables -A FORWARD -i $tundev -j ACCEPT
iptables -t nat -A POSTROUTING -o $tundev -j MASQUERADE
```
$tundev will be the tunnel created, which usually is tun0.

Thanks a lot!

David Cabrejos


----------



## SirDice (Apr 16, 2012)

Something like this perhaps?


```
nat on $tundev from any to any -> ($tundev)
```


----------



## drcabrejos (Apr 16, 2012)

Thanks SirDice. I'll test it out as soon as I have a chance and let you know my results!


----------

