tcpbridge.1 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. .TH TCPBRIDGE 1 2005-07-28 "" "Programmer's Manual"
  2. .\" DO NOT EDIT THIS FILE (tcpbridge.1)
  3. .\"
  4. .\" It has been AutoGen-ed Thursday July 28, 2005 at 09:53:37 PM PDT
  5. .\" From the definitions tcpbridge_opts.def
  6. .\" and the template file agman1.tpl
  7. .\"
  8. .SH NAME
  9. tcpbridge \- Bridge network traffic across two interfaces
  10. .SH SYNOPSIS
  11. .B tcpbridge
  12. .\" Mixture of short (flag) options and long options
  13. .RB [ -\fIflag\fP " [\fIvalue\fP]]... [" --\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
  14. .PP
  15. All arguments must be options.
  16. .PP
  17. tcpbridge is a tool for briding network traffic across two interfaces
  18. and optionally modifying the packets in betweeen
  19. .SH "DESCRIPTION"
  20. This manual page documents, briefly, the \fBtcpbridge\fP command.
  21. The basic operation of tcpbridge is to be a network bridge between two
  22. subnets. All packets recieved on one interface are sent via the other.
  23. Optionally, packets can be edited in a variety of ways according to your needs.
  24. .SH OPTIONS
  25. .TP
  26. .BR -d " \fInumber\fP, " --dbug "=" \fInumber\fP
  27. Enable debugging output.
  28. This option may appear up to 1 times.
  29. The default \fInumber\fP for this option is:
  30. .ti +4
  31. 0
  32. .sp
  33. If configured with --enable-debug, then you can specify a verbosity
  34. level for debugging output. Higher numbers increase verbosity.
  35. .TP
  36. .BR -v ", " --verbose
  37. Print decoded packets via tcpdump to STDOUT.
  38. This option may appear up to 1 times.
  39. .sp
  40. .TP
  41. .BR -A " \fIstring\fP, " --decode "=" \fIstring\fP
  42. Arguments passed to tcpdump decoder.
  43. This option may appear up to 1 times.
  44. This option must appear in combination with the following options:
  45. verbose.
  46. .sp
  47. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  48. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  49. are decoded. By default, -n and -l are used. Be sure to
  50. quote the arguments like: -A "-axxx" so that they are not interpreted
  51. by tcpbridge. The following arguments are vaild:
  52. [ -aAeNqRStuvxX ]
  53. [ -E spi@ipaddr algo:secret,... ]
  54. [ -s snaplen ]
  55. .TP
  56. .BR -i " \fIstring\fP, " --intf1 "=" \fIstring\fP
  57. Primary interface (listen in uni-directional mode).
  58. This option may appear up to 1 times.
  59. .sp
  60. .TP
  61. .BR -I " \fIstring\fP, " --intf2 "=" \fIstring\fP
  62. Secondary interface (send in uni-directional mode).
  63. This option may appear up to 1 times.
  64. .sp
  65. .TP
  66. .BR -u ", " --unidir
  67. Send and receive in only one direction.
  68. This option may appear up to 1 times.
  69. .sp
  70. Normally, tcpbridge will send and receive traffic in both directions
  71. (bi-directionally). However, if you choose this option, traffic will
  72. be sent uni-directionally.
  73. .TP
  74. .BR -D " \fIstring\fP, " --dmac "=" \fIstring\fP
  75. Rewrite destination MAC addresses.
  76. This option may appear up to 1 times.
  77. .sp
  78. Takes a pair of comma deliminated ethernet MAC addresses which
  79. will replace the destination MAC address of outbound packets.
  80. The first MAC address will be used for the server traffic
  81. and the optional second MAC address will be used for the client
  82. traffic.
  83. Example:
  84. .nf
  85. --dmac 00:12:13:14:15:16,00:22:33:44:55:66
  86. .fi
  87. .TP
  88. .BR -S " \fIstring\fP, " --smac "=" \fIstring\fP
  89. Rewrite source MAC addresses.
  90. This option may appear up to 1 times.
  91. .sp
  92. Takes a pair of comma deliminated ethernet MAC addresses which
  93. will replace the source MAC address of outbound packets.
  94. The first MAC address will be used for the server traffic
  95. and the optional second MAC address will be used for the client traffic.
  96. Example:
  97. .nf
  98. --smac 00:12:13:14:15:16,00:22:33:44:55:66
  99. .fi
  100. .TP
  101. .BR -l " \fInumber\fP, " --limit "=" \fInumber\fP
  102. Limit the number of packets to send.
  103. This option may appear up to 1 times.
  104. The default \fInumber\fP for this option is:
  105. .ti +4
  106. -1
  107. .sp
  108. By default, tcpbridge will send packets forever or until Ctrl-C. Alternatively,
  109. you can specify a maximum number of packets to send.
  110. .TP
  111. .BR -x " \fIstring\fP, " --include "=" \fIstring\fP
  112. Include only packets matching rule.
  113. This option may appear up to 1 times.
  114. This option must not appear in combination with any of the following options:
  115. exclude.
  116. .sp
  117. Override default of sending all packets stored in the capture file and only
  118. send packets which match the provided rule. Rules can be one of:
  119. .sp
  120. .IR "S:<CIDR1>,... "
  121. - Source IP must match specified CIDR(s)
  122. .sp
  123. .IR "D:<CIDR1>,... "
  124. - Destination IP must match specified CIDR(s)
  125. .sp
  126. .IR "B:<CIDR1>,... "
  127. - Both source and destination IP must match specified CIDR(s)
  128. .sp
  129. .IR "E:<CIDR1>,... "
  130. - Either IP must match specified CIDR(s)
  131. .sp
  132. .IR "P:<LIST> "
  133. - Must be one of the listed packets where the list
  134. corresponds to the packet number in the capture file.
  135. .nf
  136. -x P:1-5,9,15,72-
  137. .fi
  138. would send packets 1 thru 5, the 9th and 15th packet, and packets 72 until the
  139. end of the file
  140. .sp
  141. .IR "F:'<bpf>'"
  142. - BPF filter. See the \fItcpdump(8)\fP man page for syntax.
  143. .br
  144. .TP
  145. .BR -X " \fIstring\fP, " --exclude "=" \fIstring\fP
  146. Exclude any packet matching this rule.
  147. This option may appear up to 1 times.
  148. This option must not appear in combination with any of the following options:
  149. include.
  150. .sp
  151. Override default of sending all packets stored in the capture file and only
  152. send packets which do not match the provided rule. Rules can be one of:
  153. .sp
  154. .IR "S:<CIDR1>,... "
  155. - Source IP must not match specified CIDR(s)
  156. .sp
  157. .IR "D:<CIDR1>,... "
  158. - Destination IP must not match specified CIDR(s)
  159. .sp
  160. .IR "B:<CIDR1>,... "
  161. - Both source and destination IP must not match specified CIDR(s)
  162. .sp
  163. .IR "E:<CIDR1>,... "
  164. - Either IP must not match specified CIDR(s)
  165. .sp
  166. .IR "P:<LIST> "
  167. - Must not be one of the listed packets where the list
  168. corresponds to the packet number in the capture file.
  169. .nf
  170. -x P:1-5,9,15,72-
  171. .fi
  172. would drop packets 1 thru 5, the 9th and 15th packet, and packets 72 until the
  173. end of the file
  174. .br
  175. .TP
  176. .BR -T " \fIstring\fP, " --vlan "=" \fIstring\fP
  177. Specify 802.1q VLAN tag mode.
  178. This option may appear up to 1 times.
  179. .sp
  180. Allows you to rewrite ethernet frames to add a 802.1q header to standard 802.3
  181. ethernet headers or remove the 802.1q VLAN tag information.
  182. .sp 1
  183. \fBadd\fP
  184. Rewrites the existing 802.3 ethernet header as an 802.1q VLAN header
  185. .sp 1
  186. \fBdel\fP
  187. Rewrites the existing 802.1q VLAN header as an 802.3 ethernet header
  188. .TP
  189. .BR -t " \fInumber\fP, " --vlan-tag "=" \fInumber\fP
  190. Specify the new 802.1q VLAN tag value.
  191. This option may appear up to 1 times.
  192. This option must appear in combination with the following options:
  193. vlan.
  194. .sp
  195. .TP
  196. .BR -c " \fInumber\fP, " --vlan-cfi "=" \fInumber\fP
  197. Specify the 802.1q VLAN CFI value.
  198. This option may appear up to 1 times.
  199. This option must appear in combination with the following options:
  200. vlan.
  201. .sp
  202. .TP
  203. .BR -p " \fInumber\fP, " --vlan-pri "=" \fInumber\fP
  204. Specify the 802.1q VLAN priority.
  205. This option may appear up to 1 times.
  206. This option must appear in combination with the following options:
  207. vlan.
  208. .sp
  209. .TP
  210. .BR -P ", " --pid
  211. Print the PID of tcpbridge at startup.
  212. .sp
  213. .TP
  214. .BR -V ", " --version
  215. Print version information.
  216. .sp
  217. .TP
  218. .BR -h ", " --less-help
  219. Display less usage information and exit.
  220. .sp
  221. .TP
  222. .BR \-H , " \--help"
  223. Display usage information and exit.
  224. .TP
  225. .BR \-! , " \--more-help"
  226. Extended usage information passed thru pager.
  227. .TP
  228. .BR \- " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
  229. Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
  230. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  231. .TP
  232. .BR \- " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " --no-load-opts"
  233. Load options from \fIrcfile\fP.
  234. The \fIno-load-opts\fP form will disable the loading
  235. of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
  236. out of order.
  237. .SH OPTION PRESETS
  238. Any option that is not marked as \fInot presettable\fP may be preset
  239. by loading values from configuration ("RC" or ".INI") file(s).
  240. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  241. In that case, the file "\fI.tcpbridgerc\fP"
  242. is searched for within that directory.
  243. .SH "SIGNALS"
  244. tcpbridge understands the following signals:
  245. .sp
  246. .IR "\fBSIGUSR1\fP"
  247. Suspend tcpbridge
  248. .sp
  249. .IR "\fBSIGCONT\fP"
  250. Restart tcpbridge
  251. .br
  252. .SH "SEE ALSO"
  253. tcpdump(1), tcpprep(1), tcprewrite(1), tcpreplay(1)
  254. .SH "BUGS"
  255. tcpbridge can only send packets as fast as your computer's interface,
  256. processor and system bus will allow.
  257. Connecting both interfaces to the same subnet may create a broadcast storm and
  258. take down the network. Improper use of the packet editing functions may have
  259. other undefined and possible negative consequences.
  260. Some operating systems by default do not allow for forging source MAC
  261. addresses. Please consult your operating system's documentation and the
  262. tcpreplay FAQ if you experiance this issue.
  263. .SH AUTHOR
  264. Copyright 2000-2005 Aaron Turner
  265. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  266. .PP
  267. Released under the Free BSD License.
  268. .PP
  269. This manual page was \fIAutoGen\fP-erated from the \fBtcpbridge\fP
  270. option definitions.