My setup:
en1: my wireless NIC, connected to an internet provider
en0: my wired NIC, which I need to serve a static 10.0.0/24 network
First, enable IP forwarding in the kernel:
sudo sysctl -w net.inet.ip.forwarding=1
Next, run NAT:
sudo natd -interface en1 -v yes
The "-v yes" option will run it in the foreground, which is useful for debugging.
Then, have the firewall forward traffic from the NICs through NAT:
sudo ipfw flushsudo ipfw add divert natd all from any to any via en1sudo ipfw add divert natd all from any to any via en0sudo ipfw add 65535 allow all from any to any
Awesome You are the Great
ReplyDeleteMAN
thankyou so much you saved my toooooo much time
thanks