summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-06-04 17:30:24 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2007-06-04 17:30:24 +0000
commit37aa26983847cf1be7884427b16815da84e6b82a (patch)
tree50a1b300c736226eec810e5a162913ea49fdc18f /examples
parent96e24fbed8e9e45c82e500eb4d34293696dced23 (diff)
add aliases --sport and --dport to make it more iptables-like
Diffstat (limited to 'examples')
-rw-r--r--examples/cli/test.sh22
1 files changed, 10 insertions, 12 deletions
diff --git a/examples/cli/test.sh b/examples/cli/test.sh
index cb449bf..2a0fef7 100644
--- a/examples/cli/test.sh
+++ b/examples/cli/test.sh
@@ -24,32 +24,30 @@ case $1 in
;;
new-simple)
echo "creating a new conntrack (simplified)"
- $CONNTRACK -I --orig-src $SRC --orig-dst $DST \
- -p tcp --orig-port-src $SPORT --orig-port-dst $DPORT \
+ $CONNTRACK -I -s $SRC -d $DST \
+ -p tcp --sport $SPORT --dport $DPORT \
--state LISTEN -u SEEN_REPLY -t 50
;;
new-nat)
echo "creating a new conntrack (NAT)"
- $CONNTRACK -I --orig-src $SRC --orig-dst $DST \
- -p tcp --orig-port-src $SPORT --orig-port-dst $DPORT \
+ $CONNTRACK -I -s $SRC -d $DST \
+ -p tcp --sport $SPORT --dport $DPORT \
--state LISTEN -u SEEN_REPLY -t 50 --dst-nat 8.8.8.8
;;
get)
echo "getting a conntrack"
- $CONNTRACK -G --orig-src $SRC --orig-dst $DST \
- -p tcp --orig-port-src $SPORT --orig-port-dst $DPORT
+ $CONNTRACK -G -s $SRC -d $DST \
+ -p tcp --sport $SPORT --dport $DPORT
;;
change)
echo "change a conntrack"
- $CONNTRACK -U --orig-src $SRC --orig-dst $DST \
- --reply-src $DST --reply-dst $SRC -p tcp \
- --orig-port-src $SPORT --orig-port-dst $DPORT \
- --reply-port-src $DPORT --reply-port-dst $SPORT \
+ $CONNTRACK -U -s $SRC -d $DST \
+ -p tcp --sport $SPORT --dport $DPORT \
--state TIME_WAIT -u ASSURED,SEEN_REPLY -t 500
;;
delete)
- $CONNTRACK -D --orig-src $SRC --orig-dst $DST \
- -p tcp --orig-port-src $SPORT --orig-port-dst $DPORT
+ $CONNTRACK -D -s $SRC -d $DST \
+ -p tcp --sport $SPORT --dport $DPORT
;;
output)
proc=$(cat /proc/net/ip_conntrack | wc -l)