web-dev-qa-db-ja.com

iptablesコマンドをipfwに変換する

私はubuntuで作成したコードをosxで変換しようとしています。 iptablesコマンドをipfwコマンドに変換する方法がわかりません。どんな助けでもいただければ幸いです。

Ubuntuコード:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ssh server -l root -w0:0
ifconfig tun0 10.0.0.1 netmask 255.0.0.0
route add -net 1.2.3.4 dev tun0
iptables -t nat -A OUTPUT -p all -d 15.0.0.5 -o tun0 -j DNAT --to-destination 10.0.0.5
route add -Host 15.0.0.5 dev tun0

Mac OS Xコード:

sysctl -w net.inet.ip.forwarding=1 
HELP HERE PLEASE!
ssh server -l root -w0:0
ifconfig tun0 10.0.0.1 netmask 255.0.0.0
route add -net 1.2.3.4 dev tun0
HERE TOO HERE!
route add -Host 15.0.0.5 dev tun0
2
Quintin

このページの最後に、ipfwを使用したNATの例があります。これがお役に立てば幸いです。

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html
1
ott--