xref: /freebsd/sbin/natd/samples/natd.test (revision 24084f9bfc80f32d7390568d742988293cc6547b)
124084f9bSBrian Somers#!/bin/sh
224084f9bSBrian Somers
324084f9bSBrian Somers	if [ $# != 1 ]
424084f9bSBrian Somers	then
524084f9bSBrian Somers		echo "usage: natd.test ifname"
624084f9bSBrian Somers		exit 1
724084f9bSBrian Somers	fi
824084f9bSBrian Somers
924084f9bSBrian Somers	ipfw flush
1024084f9bSBrian Somers	ipfw add divert 32000 ip from any to any via $1
1124084f9bSBrian Somers	ipfw add pass ip from any to any
1224084f9bSBrian Somers
1324084f9bSBrian Somers	./natd -port 32000 -interface $1 -verbose
1424084f9bSBrian Somers
15