/usr/sbin/iptables -A INPUT -i eth1 -s 192.168.1.92 -p TCP --dport 8342 -j ACCEPT
/usr/sbin/iptables -A OUTPUT -o eth1 -s 192.168.1.92 -p TCP --sport 8342 -j ACCEPT
iptables has for tables: raw, nat, mangle, filter
When you define a rule, you can specify the table for which it applies to, like
iptables -t nat ....
The default table is filter. The -t <table> is optional. When you omit this option, then it applies to the filter table.
-i <interface> Name of an interface via which a packet was received. Only for packets entering the INPUT, FORWARD and PREROUTING chains.
-o <interface> Name of an interface via which a packet is going to be sent. Only for packet entering the FORWARD, OUTPUT and POSTROUTING chains.
-s <address> Specifies the source address. Can either be a network name, a network IP address with mask or a plain IP address.
-d <address> Specifies the destination address, analogous to -s
--dport <portnum> is the destination port
--sport is the source port
-j This specifies the target of the rule, i.e. what to do if the packet matches it. The target can be a user defined chain or one of the special builtin targets.
List all rules in the selected chain
iptables -L <chain> If no chain is given, then all chains are listed.
Check weather the filter table is here:
iptables -t filter -L
iptables -X <chain> Delete the optional user defined chain. If no name is given, it will attempt to delete all non-builtin chains in the table.
iptables -F <chain> Flush the selected chain or all the chains if no name is given.
This is an excellent tutorial on iptables.