1.\"- 2.\" Copyright (c) 2001 Charles Mott <cm@linktel.net> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd May 31, 2021 27.Dt LIBALIAS 3 28.Os 29.Sh NAME 30.Nm libalias 31.Nd packet aliasing library for masquerading and network address translation 32.Sh SYNOPSIS 33.In sys/types.h 34.In netinet/in.h 35.In alias.h 36.Pp 37Function prototypes are given in the main body of the text. 38.Sh DESCRIPTION 39The 40.Nm 41library is a collection of functions for aliasing and de-aliasing of IP 42packets, intended for masquerading and network address translation (NAT). 43.Sh INTRODUCTION 44This library is a moderately portable set of functions designed to assist 45in the process of IP masquerading and network address translation. 46Outgoing packets from a local network with unregistered IP addresses can 47be aliased to appear as if they came from an accessible IP address. 48Incoming packets are then de-aliased so that they are sent to the correct 49machine on the local network. 50.Pp 51A certain amount of flexibility is built into the packet aliasing engine. 52In the simplest mode of operation, a many-to-one address mapping takes 53place between the local network and the packet aliasing host. 54This is known as IP masquerading. 55In addition, one-to-one mappings between local and public addresses can 56also be implemented, which is known as static NAT. 57In between these extremes, different groups of private addresses can be 58linked to different public addresses, comprising several distinct 59many-to-one mappings. 60Also, a given public address and port can be statically redirected to a 61private address/port. 62.Sh INITIALIZATION AND CONTROL 63One special function, 64.Fn LibAliasInit , 65must always be called before any packet handling may be performed, and 66the returned instance pointer must be passed to all the other functions. 67Normally, the 68.Fn LibAliasSetAddress 69function is called afterwards, to set the default aliasing address. 70In addition, the operating mode of the packet aliasing engine can be 71customized by calling 72.Fn LibAliasSetMode . 73.Pp 74.Ft "struct libalias *" 75.Fn LibAliasInit "struct libalias *" 76.Bd -ragged -offset indent 77This function is used to initialize 78internal data structures. 79When called the first time, a 80.Dv NULL 81pointer should be passed as an argument. 82The following mode bits are always set after calling 83.Fn LibAliasInit . 84See the description of 85.Fn LibAliasSetMode 86below for the meaning of these mode bits. 87.Pp 88.Bl -item -offset indent -compact 89.It 90.Dv PKT_ALIAS_SAME_PORTS 91.It 92.Dv PKT_ALIAS_USE_SOCKETS 93.It 94.Dv PKT_ALIAS_RESET_ON_ADDR_CHANGE 95.El 96.Pp 97This function will always return the packet aliasing engine to the same 98initial state. 99The 100.Fn LibAliasSetAddress 101function is normally called afterwards, and any desired changes from the 102default mode bits listed above require a call to 103.Fn LibAliasSetMode . 104.Pp 105It is mandatory that this function be called at the beginning of a program 106prior to any packet handling. 107.Ed 108.Pp 109.Ft void 110.Fn LibAliasUninit "struct libalias *" 111.Bd -ragged -offset indent 112This function has no return value and is used to clear any 113resources attached to internal data structures. 114.Pp 115This function should be called when a program stops using the aliasing 116engine; amongst other things, it clears out any firewall holes. 117To provide backwards compatibility and extra security, it is added to 118the 119.Xr atexit 3 120chain by 121.Fn LibAliasInit . 122.Ed 123.Pp 124.Ft void 125.Fn LibAliasSetAddress "struct libalias *" "struct in_addr addr" 126.Bd -ragged -offset indent 127This function sets the source address to which outgoing packets from the 128local area network are aliased. 129All outgoing packets are re-mapped to this address unless overridden by a 130static address mapping established by 131.Fn LibAliasRedirectAddr . 132If this function has not been called, and no static rules match, an outgoing 133packet retains its source address. 134.Pp 135If the 136.Dv PKT_ALIAS_RESET_ON_ADDR_CHANGE 137mode bit is set (the default mode of operation), then the internal aliasing 138link tables will be reset any time the aliasing address changes. 139This is useful for interfaces such as 140.Xr ppp 8 , 141where the IP 142address may or may not change on successive dial-up attempts. 143.Pp 144If the 145.Dv PKT_ALIAS_RESET_ON_ADDR_CHANGE 146mode bit is set to zero, this function can also be used to dynamically change 147the aliasing address on a packet-to-packet basis (it is a low overhead call). 148.Pp 149It is mandatory that this function be called prior to any packet handling. 150.Ed 151.Pp 152.Ft unsigned int 153.Fn LibAliasSetMode "struct libalias *" "unsigned int flags" "unsigned int mask" 154.Bd -ragged -offset indent 155This function sets or clears mode bits 156according to the value of 157.Fa flags . 158Only bits marked in 159.Fa mask 160are affected. 161The following mode bits are defined in 162.In alias.h : 163.Bl -tag -width indent 164.It Dv PKT_ALIAS_LOG 165Enables logging into 166.Pa /var/log/alias.log . 167Each time an aliasing link is created or deleted, the log file is appended to 168with the current number of ICMP, TCP and UDP links. 169Mainly useful for debugging when the log file is viewed continuously with 170.Xr tail 1 . 171.It Dv PKT_ALIAS_DENY_INCOMING 172If this mode bit is set, all incoming packets associated with new TCP 173connections or new UDP transactions will be marked for being ignored 174.Po 175.Fn LibAliasIn 176returns 177.Dv PKT_ALIAS_IGNORED 178code 179.Pc 180by the calling program. 181Response packets to connections or transactions initiated from the packet 182aliasing host or local network will be unaffected. 183This mode bit is useful for implementing a one-way firewall. 184.It Dv PKT_ALIAS_SAME_PORTS 185If this mode bit is set, the packet-aliasing engine will attempt to leave 186the alias port numbers unchanged from the actual local port numbers. 187This can be done as long as the quintuple (proto, alias addr, alias port, 188remote addr, remote port) is unique. 189If a conflict exists, a new aliasing port number is chosen even if this 190mode bit is set. 191.It Dv PKT_ALIAS_USE_SOCKETS 192This bit should be set when the packet aliasing host originates network 193traffic as well as forwards it. 194When the packet aliasing host is waiting for a connection from an unknown 195host address or unknown port number (e.g.\& an FTP data connection), this 196mode bit specifies that a socket be allocated as a place holder to prevent 197port conflicts. 198Once a connection is established, usually within a minute or so, the socket 199is closed. 200.It Dv PKT_ALIAS_UNREGISTERED_ONLY 201If this mode bit is set, traffic on the local network which does not 202originate from unregistered address spaces will be ignored. 203Standard Class A, B and C unregistered addresses are: 204.Pp 20510.0.0.0 -> 10.255.255.255 (Class A subnet) 206172.16.0.0 -> 172.31.255.255 (Class B subnets) 207192.168.0.0 -> 192.168.255.255 (Class C subnets) 208.Pp 209This option is useful in the case that the packet aliasing host has both 210registered and unregistered subnets on different interfaces. 211The registered subnet is fully accessible to the outside world, so traffic 212from it does not need to be passed through the packet aliasing engine. 213.It Dv PKT_ALIAS_UNREGISTERED_CGN 214Like PKT_ALIAS_UNREGISTERED_ONLY, but includes the RFC 6598 (Carrier Grade 215NAT) subnet as follows: 216.Pp 217100.64.0.0 -> 100.127.255.255 (RFC 6598 subnet) 218.It Dv PKT_ALIAS_RESET_ON_ADDR_CHANGE 219When this mode bit is set and 220.Fn LibAliasSetAddress 221is called to change the aliasing address, the internal link table of the 222packet aliasing engine will be cleared. 223This operating mode is useful for 224.Xr ppp 8 225links where the interface address can sometimes change or remain the same 226between dial-up attempts. 227If this mode bit is not set, the link table will never be reset in the event 228of an address change. 229.It Dv PKT_ALIAS_PUNCH_FW 230This option makes 231.Nm 232.Dq punch holes 233in an 234.Xr ipfirewall 4 - 235based firewall for FTP/IRC DCC connections. 236The holes punched are bound by from/to IP address and port; it will not be 237possible to use a hole for another connection. 238A hole is removed when the connection that uses it dies. 239To cater to unexpected death of a program using 240.Nm 241(e.g.\& kill -9), 242changing the state of the flag will clear the entire firewall range 243allocated for holes. 244This clearing will also happen on the initial call to 245.Fn LibAliasSetFWBase , 246which must happen prior to setting this flag. 247.It Dv PKT_ALIAS_REVERSE 248This option makes 249.Nm 250reverse the way it handles incoming and outgoing packets, allowing it 251to be fed with data that passes through the internal interface rather 252than the external one. 253.It Dv PKT_ALIAS_PROXY_ONLY 254This option tells 255.Nm 256to obey transparent proxy rules only. 257Normal packet aliasing is not performed. 258See 259.Fn LibAliasProxyRule 260below for details. 261.It Dv PKT_ALIAS_SKIP_GLOBAL 262This option is used by 263.Pa ipfw_nat 264only. 265Specifying it as a flag to 266.Fn LibAliasSetMode 267has no effect. 268See section 269.Sx NETWORK ADDRESS TRANSLATION 270in 271.Xr ipfw 8 272for more details. 273.El 274.Ed 275.Pp 276.Ft void 277.Fn LibAliasSetFWBase "struct libalias *" "unsigned int base" "unsigned int num" 278.Bd -ragged -offset indent 279Set the firewall range allocated for punching firewall holes (with the 280.Dv PKT_ALIAS_PUNCH_FW 281flag). 282The range is cleared for all rules on initialization. 283.Ed 284.Pp 285.Ft void 286.Fn LibAliasSkinnyPort "struct libalias *" "unsigned int port" 287.Bd -ragged -offset indent 288Set the TCP port used by the Skinny Station protocol. 289Skinny is used by Cisco IP phones to communicate with 290Cisco Call Managers to set up voice over IP calls. 291If this is not set, Skinny aliasing will not be done. 292The typical port used by Skinny is 2000. 293.Ed 294.Sh PACKET HANDLING 295The packet handling functions are used to modify incoming (remote to local) 296and outgoing (local to remote) packets. 297The calling program is responsible for receiving and sending packets via 298network interfaces. 299.Pp 300Along with 301.Fn LibAliasInit 302and 303.Fn LibAliasSetAddress , 304the two packet handling functions, 305.Fn LibAliasIn 306and 307.Fn LibAliasOut , 308comprise the minimal set of functions needed for a basic IP masquerading 309implementation. 310.Pp 311.Ft int 312.Fn LibAliasIn "struct libalias *" "void *buffer" "int maxpacketsize" 313.Bd -ragged -offset indent 314An incoming packet coming from a remote machine to the local network is 315de-aliased by this function. 316The IP packet is pointed to by 317.Fa buffer , 318and 319.Fa maxpacketsize 320indicates the size of the data structure containing the packet and should 321be at least as large as the actual packet size. 322.Pp 323Return codes: 324.Bl -tag -width indent 325.It Dv PKT_ALIAS_OK 326The packet aliasing process was successful. 327.It Dv PKT_ALIAS_IGNORED 328The packet was ignored and not de-aliased. 329This can happen if the protocol is unrecognized, as for an ICMP message 330type that is not handled, or if incoming packets for new connections are being 331ignored (if the 332.Dv PKT_ALIAS_DENY_INCOMING 333mode bit was set using 334.Fn LibAliasSetMode ) . 335.It Dv PKT_ALIAS_UNRESOLVED_FRAGMENT 336This is returned when a fragment cannot be resolved because the header 337fragment has not been sent yet. 338In this situation, fragments must be saved with 339.Fn LibAliasSaveFragment 340until a header fragment is found. 341.It Dv PKT_ALIAS_FOUND_HEADER_FRAGMENT 342The packet aliasing process was successful, and a header fragment was found. 343This is a signal to retrieve any unresolved fragments with 344.Fn LibAliasGetFragment 345and de-alias them with 346.Fn LibAliasFragmentIn . 347.It Dv PKT_ALIAS_ERROR 348An internal error within the packet aliasing engine occurred. 349.El 350.Ed 351.Pp 352.Ft int 353.Fn LibAliasOut "struct libalias *" "void *buffer" "int maxpacketsize" 354.Bd -ragged -offset indent 355An outgoing packet coming from the local network to a remote machine is 356aliased by this function. 357The IP packet is pointed to by 358.Fa buffer , 359and 360.Fa maxpacketsize 361indicates the maximum packet size permissible should the packet length be 362changed. 363IP encoding protocols place address and port information in the encapsulated 364data stream which has to be modified and can account for changes in packet 365length. 366Well known examples of such protocols are FTP and IRC DCC. 367.Pp 368Return codes: 369.Bl -tag -width indent 370.It Dv PKT_ALIAS_OK 371The packet aliasing process was successful. 372.It Dv PKT_ALIAS_IGNORED 373The packet was ignored and not aliased. 374This can happen if the protocol is unrecognized, or possibly an ICMP message 375type is not handled. 376.It Dv PKT_ALIAS_ERROR 377An internal error within the packet aliasing engine occurred. 378.El 379.Ed 380.Sh PORT AND ADDRESS REDIRECTION 381The functions described in this section allow machines on the local network 382to be accessible in some degree to new incoming connections from the external 383network. 384Individual ports can be re-mapped or static network address translations can 385be designated. 386.Pp 387.Ft struct alias_link * 388.Fo LibAliasRedirectPort 389.Fa "struct libalias *" 390.Fa "struct in_addr local_addr" 391.Fa "u_short local_port" 392.Fa "struct in_addr remote_addr" 393.Fa "u_short remote_port" 394.Fa "struct in_addr alias_addr" 395.Fa "u_short alias_port" 396.Fa "u_char proto" 397.Fc 398.Bd -ragged -offset indent 399This function specifies that traffic from a given remote address/port to 400an alias address/port be redirected to a specified local address/port. 401The parameter 402.Fa proto 403can be either 404.Dv IPPROTO_TCP 405or 406.Dv IPPROTO_UDP , 407as defined in 408.In netinet/in.h . 409.Pp 410If 411.Fa local_addr 412or 413.Fa alias_addr 414is zero, this indicates that the packet aliasing address as established 415by 416.Fn LibAliasSetAddress 417is to be used. 418Even if 419.Fn LibAliasSetAddress 420is called to change the address after 421.Fn LibAliasRedirectPort 422is called, a zero reference will track this change. 423.Pp 424If the link is further set up to operate with load sharing, then 425.Fa local_addr 426and 427.Fa local_port 428are ignored, and are selected dynamically from the server pool, as described in 429.Fn LibAliasAddServer 430below. 431.Pp 432If 433.Fa remote_addr 434is zero, this indicates to redirect packets from any remote address. 435Likewise, if 436.Fa remote_port 437is zero, this indicates to redirect packets originating from any remote 438port number. 439The remote port specification will almost always be zero, but non-zero 440remote addresses can sometimes be useful for firewalling. 441If two calls to 442.Fn LibAliasRedirectPort 443overlap in their address/port specifications, then the most recent call 444will have precedence. 445.Pp 446This function returns a pointer which can subsequently be used by 447.Fn LibAliasRedirectDelete . 448If 449.Dv NULL 450is returned, then the function call did not complete successfully. 451.Pp 452All port numbers should be in network address byte order, so it is necessary 453to use 454.Xr htons 3 455to convert these parameters from internally readable numbers to network byte 456order. 457Addresses are also in network byte order, which is implicit in the use of the 458.Fa struct in_addr 459data type. 460.Ed 461.Pp 462.Ft struct alias_link * 463.Fo LibAliasRedirectAddr 464.Fa "struct libalias *" 465.Fa "struct in_addr local_addr" 466.Fa "struct in_addr alias_addr" 467.Fc 468.Bd -ragged -offset indent 469This function designates that all incoming traffic to 470.Fa alias_addr 471be redirected to 472.Fa local_addr . 473Similarly, all outgoing traffic from 474.Fa local_addr 475is aliased to 476.Fa alias_addr . 477.Pp 478If 479.Fa local_addr 480or 481.Fa alias_addr 482is zero, this indicates that the packet aliasing address as established by 483.Fn LibAliasSetAddress 484is to be used. 485Even if 486.Fn LibAliasSetAddress 487is called to change the address after 488.Fn LibAliasRedirectAddr 489is called, a zero reference will track this change. 490.Pp 491If the link is further set up to operate with load sharing, then the 492.Fa local_addr 493argument is ignored, and is selected dynamically from the server pool, 494as described in 495.Fn LibAliasAddServer 496below. 497.Pp 498If subsequent calls to 499.Fn LibAliasRedirectAddr 500use the same aliasing address, all new incoming traffic to this aliasing 501address will be redirected to the local address made in the last function 502call. 503New traffic generated by any of the local machines, designated in the 504several function calls, will be aliased to the same address. 505Consider the following example: 506.Pp 507LibAliasRedirectAddr(la, inet_aton("192.168.0.2"), 508 inet_aton("141.221.254.101")); 509LibAliasRedirectAddr(la, inet_aton("192.168.0.3"), 510 inet_aton("141.221.254.101")); 511LibAliasRedirectAddr(la, inet_aton("192.168.0.4"), 512 inet_aton("141.221.254.101")); 513.Pp 514Any outgoing connections such as 515.Xr telnet 1 516or 517.Xr ftp 1 518from 192.168.0.2, 192.168.0.3 and 192.168.0.4 will appear to come from 519141.221.254.101. 520Any incoming connections to 141.221.254.101 will be directed to 192.168.0.4. 521.Pp 522Any calls to 523.Fn LibAliasRedirectPort 524will have precedence over address mappings designated by 525.Fn LibAliasRedirectAddr . 526.Pp 527This function returns a pointer which can subsequently be used by 528.Fn LibAliasRedirectDelete . 529If 530.Dv NULL 531is returned, then the function call did not complete successfully. 532.Ed 533.Pp 534.Ft int 535.Fo LibAliasAddServer 536.Fa "struct libalias *" 537.Fa "struct alias_link *link" 538.Fa "struct in_addr addr" 539.Fa "u_short port" 540.Fc 541.Bd -ragged -offset indent 542This function sets the 543.Fa link 544up for Load Sharing using IP Network Address Translation (RFC 2391, LSNAT). 545LSNAT operates as follows. 546A client attempts to access a server by using the server virtual address. 547The LSNAT router transparently redirects the request to one of the hosts 548in the server pool, using a real-time load sharing algorithm. 549Multiple sessions may be initiated from the same client, and each session 550could be directed to a different host based on the load balance across server 551pool hosts when the sessions are initiated. 552If load sharing is desired for just a few specific services, the configuration 553on LSNAT could be defined to restrict load sharing to just the services 554desired. 555.Pp 556Currently, only the simplest selection algorithm is implemented, where a 557host is selected on a round-robin basis only, without regard to load on 558the host. 559.Pp 560First, the 561.Fa link 562is created by either 563.Fn LibAliasRedirectPort 564or 565.Fn LibAliasRedirectAddr . 566Then, 567.Fn LibAliasAddServer 568is called multiple times to add entries to the 569.Fa link Ns 's 570server pool. 571.Pp 572For links created with 573.Fn LibAliasRedirectAddr , 574the 575.Fa port 576argument is ignored and could have any value, e.g.\& htons(~0). 577.Pp 578This function returns 0 on success, \-1 otherwise. 579.Ed 580.Pp 581.Ft int 582.Fn LibAliasRedirectDynamic "struct libalias *" "struct alias_link *link" 583.Bd -ragged -offset indent 584This function marks the specified static redirect rule entered by 585.Fn LibAliasRedirectPort 586as dynamic. 587This can be used to e.g.\& dynamically redirect a single TCP connection, 588after which the rule is removed. 589Only fully specified links can be made dynamic. 590(See the 591.Sx STATIC AND DYNAMIC LINKS 592and 593.Sx PARTIALLY SPECIFIED ALIASING LINKS 594sections below for a definition of static vs.\& dynamic, 595and partially vs.\& fully specified links.) 596.Pp 597This function returns 0 on success, \-1 otherwise. 598.Ed 599.Pp 600.Ft void 601.Fn LibAliasRedirectDelete "struct libalias *" "struct alias_link *link" 602.Bd -ragged -offset indent 603This function will delete a specific static redirect rule entered by 604.Fn LibAliasRedirectPort 605or 606.Fn LibAliasRedirectAddr . 607The parameter 608.Fa link 609is the pointer returned by either of the redirection functions. 610If an invalid pointer is passed to 611.Fn LibAliasRedirectDelete , 612then a program crash or unpredictable operation could result, so 613care is needed when using this function. 614.Ed 615.Pp 616.Ft int 617.Fn LibAliasProxyRule "struct libalias *" "const char *cmd" 618.Bd -ragged -offset indent 619The passed 620.Fa cmd 621string consists of one or more pairs of words. 622The first word in each pair is a token and the second is the value that 623should be applied for that token. 624Tokens and their argument types are as follows: 625.Bl -tag -width indent 626.It Cm type encode_ip_hdr | encode_tcp_stream | no_encode 627In order to support transparent proxying, it is necessary to somehow 628pass the original address and port information into the new destination 629server. 630If 631.Cm encode_ip_hdr 632is specified, the original destination address and port are passed 633as an extra IP option. 634If 635.Cm encode_tcp_stream 636is specified, the original destination address and port are passed 637as the first piece of data in the TCP stream in the format 638.Dq Li DEST Ar IP port . 639.It Cm port Ar portnum 640Only packets with the destination port 641.Ar portnum 642are proxied. 643.It Cm server Ar host Ns Op : Ns Ar portnum 644This specifies the 645.Ar host 646and 647.Ar portnum 648that the data is to be redirected to. 649.Ar host 650must be an IP address rather than a DNS host name. 651If 652.Ar portnum 653is not specified, the destination port number is not changed. 654.Pp 655The 656.Ar server 657specification is mandatory unless the 658.Cm delete 659command is being used. 660.It Cm rule Ar index 661Normally, each call to 662.Fn LibAliasProxyRule 663inserts the next rule at the start of a linear list of rules. 664If an 665.Ar index 666is specified, the new rule will be checked after all rules with lower 667indices. 668Calls to 669.Fn LibAliasProxyRule 670that do not specify a rule are assigned rule 0. 671.It Cm delete Ar index 672This token and its argument MUST NOT be used with any other tokens. 673When used, all existing rules with the given 674.Ar index 675are deleted. 676.It Cm proto tcp | udp 677If specified, only packets of the given protocol type are matched. 678.It Cm src Ar IP Ns Op / Ns Ar bits 679If specified, only packets with a source address matching the given 680.Ar IP 681are matched. 682If 683.Ar bits 684is also specified, then the first 685.Ar bits 686bits of 687.Ar IP 688are taken as a network specification, and all IP addresses from that 689network will be matched. 690.It Cm dst Ar IP Ns Op / Ns Ar bits 691If specified, only packets with a destination address matching the given 692.Ar IP 693are matched. 694If 695.Ar bits 696is also specified, then the first 697.Ar bits 698bits of 699.Ar IP 700are taken as a network specification, and all IP addresses from that 701network will be matched. 702.El 703.Pp 704This function is usually used to redirect outgoing connections for 705internal machines that are not permitted certain types of internet 706access, or to restrict access to certain external machines. 707.Ed 708.Pp 709.Ft struct alias_link * 710.Fo LibAliasRedirectProto 711.Fa "struct libalias *" 712.Fa "struct in_addr local_addr" 713.Fa "struct in_addr remote_addr" 714.Fa "struct in_addr alias_addr" 715.Fa "u_char proto" 716.Fc 717.Bd -ragged -offset indent 718This function specifies that any IP packet with protocol number of 719.Fa proto 720from a given remote address to an alias address will be 721redirected to a specified local address. 722.Pp 723If 724.Fa local_addr 725or 726.Fa alias_addr 727is zero, this indicates that the packet aliasing address as established 728by 729.Fn LibAliasSetAddress 730is to be used. 731Even if 732.Fn LibAliasSetAddress 733is called to change the address after 734.Fn LibAliasRedirectProto 735is called, a zero reference will track this change. 736.Pp 737If 738.Fa remote_addr 739is zero, this indicates to redirect packets from any remote address. 740Non-zero remote addresses can sometimes be useful for firewalling. 741.Pp 742If two calls to 743.Fn LibAliasRedirectProto 744overlap in their address specifications, then the most recent call 745will have precedence. 746.Pp 747This function returns a pointer which can subsequently be used by 748.Fn LibAliasRedirectDelete . 749If 750.Dv NULL 751is returned, then the function call did not complete successfully. 752.Ed 753.Sh FRAGMENT HANDLING 754The functions in this section are used to deal with incoming fragments. 755.Pp 756Outgoing fragments are handled within 757.Fn LibAliasOut 758by changing the address according to any applicable mapping set by 759.Fn LibAliasRedirectAddr , 760or the default aliasing address set by 761.Fn LibAliasSetAddress . 762.Pp 763Incoming fragments are handled in one of two ways. 764If the header of a fragmented IP packet has already been seen, then all 765subsequent fragments will be re-mapped in the same manner the header 766fragment was. 767Fragments which arrive before the header are saved and then retrieved 768once the header fragment has been resolved. 769.Pp 770.Ft int 771.Fn LibAliasSaveFragment "struct libalias *" "void *ptr" 772.Bd -ragged -offset indent 773When 774.Fn LibAliasIn 775returns 776.Dv PKT_ALIAS_UNRESOLVED_FRAGMENT , 777this function can be used to save the pointer to the unresolved fragment. 778.Pp 779It is implicitly assumed that 780.Fa ptr 781points to a block of memory allocated by 782.Xr malloc 3 . 783If the fragment is never resolved, the packet aliasing engine will 784automatically free the memory after a timeout period. 785[Eventually this function should be modified so that a callback function 786for freeing memory is passed as an argument.] 787.Pp 788This function returns 789.Dv PKT_ALIAS_OK 790if it was successful and 791.Dv PKT_ALIAS_ERROR 792if there was an error. 793.Ed 794.Pp 795.Ft void * 796.Fn LibAliasGetFragment "struct libalias *" "void *buffer" 797.Bd -ragged -offset indent 798This function can be used to retrieve fragment pointers saved by 799.Fn LibAliasSaveFragment . 800The IP header fragment pointed to by 801.Fa buffer 802is the header fragment indicated when 803.Fn LibAliasIn 804returns 805.Dv PKT_ALIAS_FOUND_HEADER_FRAGMENT . 806Once a fragment pointer is retrieved, it becomes the calling program's 807responsibility to free the dynamically allocated memory for the fragment. 808.Pp 809The 810.Fn LibAliasGetFragment 811function can be called sequentially until there are no more fragments 812available, at which time it returns 813.Dv NULL . 814.Ed 815.Pp 816.Ft void 817.Fn LibAliasFragmentIn "struct libalias *" "void *header" "void *fragment" 818.Bd -ragged -offset indent 819When a fragment is retrieved with 820.Fn LibAliasGetFragment , 821it can then be de-aliased with a call to 822.Fn LibAliasFragmentIn . 823The 824.Fa header 825argument is the pointer to a header fragment used as a template, and 826.Fa fragment 827is the pointer to the packet to be de-aliased. 828.Ed 829.Sh MISCELLANEOUS FUNCTIONS 830.Ft struct alias_link * 831.Fn AddLink "struct libalias *" "struct in_addr src_addr" "struct in_addr dst_addr" \ 832"struct in_addr alias_addr" "u_short src_port" "u_short dst_port" \ 833"int alias_param" "int link_type" 834.Bd -ragged -offset indent 835This function adds new state to the instance hash table. 836The dst_address and/or dst_port may be given as zero, which 837introduces some dynamic character into the link, since 838LibAliasSetAddress can change the address that is used. 839However, in the current implementation, such links can only be used 840for inbound (ext -> int) traffic. 841.Ed 842.Pp 843.Ft void 844.Fn LibAliasSetTarget "struct libalias *" "struct in_addr addr" 845.Bd -ragged -offset indent 846When an incoming packet not associated with any pre-existing aliasing link 847arrives at the host machine, it will be sent to the address indicated by a 848call to 849.Fn LibAliasSetTarget . 850.Pp 851If this function is called with an 852.Dv INADDR_NONE 853address argument, then all new incoming packets go to the address set by 854.Fn LibAliasSetAddress . 855.Pp 856If this function is not called, or is called with an 857.Dv INADDR_ANY 858address argument, then all new incoming packets go to the address specified 859in the packet. 860This allows external machines to talk directly to internal machines if they 861can route packets to the machine in question. 862.Ed 863.Pp 864.Ft u_short 865.Fn LibAliasInternetChecksum "struct libalias *" "u_short *buffer" "int nbytes" 866.Bd -ragged -offset indent 867This is a utility function that does not seem to be available elsewhere and 868is included as a convenience. 869It computes the internet checksum, which is used in both IP and 870protocol-specific headers (TCP, UDP, ICMP). 871.Pp 872The 873.Fa buffer 874argument points to the data block to be checksummed, and 875.Fa nbytes 876is the number of bytes. 877The 16-bit checksum field should be zeroed before computing the checksum. 878.Pp 879Checksums can also be verified by operating on a block of data including 880its checksum. 881If the checksum is valid, 882.Fn LibAliasInternetChecksum 883will return zero. 884.Ed 885.Pp 886.Ft int 887.Fn LibAliasUnaliasOut "struct libalias *" "void *buffer" "int maxpacketsize" 888.Bd -ragged -offset indent 889An outgoing packet, which has already been aliased, 890has its private address/port information restored by this function. 891The IP packet is pointed to by 892.Fa buffer , 893and 894.Fa maxpacketsize 895is provided for error checking purposes. 896This function can be used if an already-aliased packet needs to have its 897original IP header restored for further processing (e.g.\& logging). 898.Ed 899.Sh CONCEPTUAL BACKGROUND 900This section is intended for those who are planning to modify the source 901code or want to create somewhat esoteric applications using the packet 902aliasing functions. 903.Pp 904The conceptual framework under which the packet aliasing engine operates 905is described here. 906Central to the discussion is the idea of an 907.Em aliasing link 908which describes the relationship for a given packet transaction between 909the local machine, aliased identity and remote machine. 910It is discussed how such links come into existence and are destroyed. 911.Ss ALIASING LINKS 912There is a notion of an 913.Em aliasing link , 914which is a 7-tuple describing a specific translation: 915.Bd -literal -offset indent 916(local addr, local port, alias addr, alias port, 917 remote addr, remote port, protocol) 918.Ed 919.Pp 920Outgoing packets have the local address and port number replaced with the 921alias address and port number. 922Incoming packets undergo the reverse process. 923The packet aliasing engine attempts to match packets against an internal 924table of aliasing links to determine how to modify a given IP packet. 925Both the IP header and protocol dependent headers are modified as necessary. 926Aliasing links are created and deleted as necessary according to network 927traffic. 928.Pp 929Protocols can be TCP, UDP or even ICMP in certain circumstances. 930(Some types of ICMP packets can be aliased according to sequence or ID 931number which acts as an equivalent port number for identifying how 932individual packets should be handled.) 933.Pp 934Each aliasing link must have a unique combination of the following five 935quantities: alias address/port, remote address/port and protocol. 936This ensures that several machines on a local network can share the 937same aliasing IP address. 938In cases where conflicts might arise, the aliasing port is chosen so that 939uniqueness is maintained. 940.Ss STATIC AND DYNAMIC LINKS 941Aliasing links can either be static or dynamic. 942Static links persist indefinitely and represent fixed rules for translating 943IP packets. 944Dynamic links come into existence for a specific TCP connection or UDP 945transaction or ICMP ECHO sequence. 946For the case of TCP, the connection can be monitored to see when the 947associated aliasing link should be deleted. 948Aliasing links for UDP transactions (and ICMP ECHO and TIMESTAMP requests) 949work on a simple timeout rule. 950When no activity is observed on a dynamic link for a certain amount of time 951it is automatically deleted. 952Timeout rules also apply to TCP connections which do not open or close 953properly. 954.Ss PARTIALLY SPECIFIED ALIASING LINKS 955Aliasing links can be partially specified, meaning that the remote address 956and/or remote port are unknown. 957In this case, when a packet matching the incomplete specification is found, 958a fully specified dynamic link is created. 959If the original partially specified link is dynamic, it will be deleted 960after the fully specified link is created, otherwise it will persist. 961.Pp 962For instance, a partially specified link might be 963.Bd -literal -offset indent 964(192.168.0.4, 23, 204.228.203.215, 8066, 0, 0, tcp) 965.Ed 966.Pp 967The zeros denote unspecified components for the remote address and port. 968If this link were static it would have the effect of redirecting all 969incoming traffic from port 8066 of 204.228.203.215 to port 23 (telnet) 970of machine 192.168.0.4 on the local network. 971Each individual telnet connection would initiate the creation of a distinct 972dynamic link. 973.Ss DYNAMIC LINK CREATION 974In addition to aliasing links, there are also address mappings that can be 975stored within the internal data table of the packet aliasing mechanism. 976.Bd -literal -offset indent 977(local addr, alias addr) 978.Ed 979.Pp 980Address mappings are searched when creating new dynamic links. 981.Pp 982All outgoing packets from the local network automatically create a dynamic 983link if they do not match an already existing fully specified link. 984If an address mapping exists for the outgoing packet, this determines 985the alias address to be used. 986If no mapping exists, then a default address, usually the address of the 987packet aliasing host, is used. 988If necessary, this default address can be changed as often as each individual 989packet arrives. 990.Pp 991The aliasing port number is determined such that the new dynamic link does 992not conflict with any existing links. 993In the default operating mode, the packet aliasing engine attempts to set 994the aliasing port equal to the local port number. 995If this results in a conflict, then port numbers are randomly chosen until 996a unique aliasing link can be established. 997In an alternate operating mode, the first choice of an aliasing port is also 998random and unrelated to the local port number. 999.Sh MODULAR ARCHITECTURE Po AND Xr ipfw 4 SUPPORT Pc 1000One of the latest improvements to 1001.Nm 1002was to make its support 1003for new protocols independent from the rest of the library, giving it 1004the ability to load/unload support for new protocols at run-time. 1005To achieve this feature, all the code for protocol handling was moved 1006to a series of modules outside of the main library. 1007These modules are compiled from the same sources but work in 1008different ways, depending on whether they are compiled to work inside a kernel 1009or as part of the userland library. 1010.Ss LIBALIAS MODULES IN KERNEL LAND 1011When compiled for the kernel, 1012.Nm 1013modules are plain KLDs recognizable with the 1014.Pa alias_ 1015prefix. 1016.Pp 1017To add support for a new protocol, load the corresponding module. 1018For example: 1019.Pp 1020.Dl "kldload alias_ftp" 1021.Pp 1022When support for a protocol is no longer needed, its module can be unloaded: 1023.Pp 1024.Dl "kldunload alias_ftp" 1025.Ss LIBALIAS MODULES IN USERLAND 1026Due to the differences between kernel and userland (no KLD mechanism, 1027many different address spaces, etc.), we had to change a bit how to 1028handle module loading/tracking/unloading in userland. 1029.Pp 1030While compiled for a userland 1031.Nm , 1032all the modules are plain libraries, residing in 1033.Pa /usr/lib , 1034and recognizable with the 1035.Pa libalias_ 1036prefix. 1037.Pp 1038There is a configuration file, 1039.Pa /etc/libalias.conf , 1040with the following contents (by default): 1041.Bd -literal -offset indent 1042/usr/lib/libalias_ftp.so 1043/usr/lib/libalias_irc.so 1044/usr/lib/libalias_nbt.so 1045/usr/lib/libalias_pptp.so 1046/usr/lib/libalias_skinny.so 1047/usr/lib/libalias_smedia.so 1048.Ed 1049.Pp 1050This file contains the paths to the modules that 1051.Nm 1052will load. 1053To load/unload a new module, just add its path to 1054.Pa libalias.conf 1055and call 1056.Fn LibAliasRefreshModules 1057from the program. 1058In case the application provides a 1059.Dv SIGHUP 1060signal handler, add a call to 1061.Fn LibAliasRefreshModules 1062inside the handler, and every time you want to refresh the loaded modules, 1063send it the 1064.Dv SIGHUP 1065signal: 1066.Pp 1067.Dl "kill -HUP <process_pid>" 1068.Ss MODULAR ARCHITECURE: HOW IT WORKS 1069The modular architecture of 1070.Nm 1071works similar whether it is running inside the 1072kernel or in userland. 1073From 1074.Pa alias_mod.c : 1075.Bd -literal 1076/* Protocol and userland module handlers chains. */ 1077LIST_HEAD(handler_chain, proto_handler) handler_chain ... 1078\&... 1079SLIST_HEAD(dll_chain, dll) dll_chain ... 1080.Ed 1081.Pp 1082.Va handler_chain 1083keeps track of all the protocol handlers loaded, while 1084.Va ddl_chain 1085tracks which userland modules are loaded. 1086.Pp 1087.Va handler_chain 1088is composed of 1089.Vt "struct proto_handler" 1090entries: 1091.Bd -literal 1092struct proto_handler { 1093 u_int pri; 1094 int16_t dir; 1095 uint8_t proto; 1096 int (*fingerprint)(struct libalias *la, 1097 struct ip *pip, struct alias_data *ah); 1098 int (*protohandler)(struct libalias *la, 1099 struct ip *pip, struct alias_data *ah); 1100 TAILQ_ENTRY(proto_handler) link; 1101}; 1102.Ed 1103.Pp 1104where: 1105.Bl -inset 1106.It Va pri 1107is the priority assigned to a protocol handler; lower priority 1108is better. 1109.It Va dir 1110is the direction of packets: ingoing or outgoing. 1111.It Va proto 1112indicates to which protocol this packet belongs: IP, TCP or UDP. 1113.It Va fingerprint 1114points to the fingerprint function while protohandler points 1115to the protocol handler function. 1116.El 1117.Pp 1118The 1119.Va fingerprint 1120function has the dual role of checking if the 1121incoming packet is found, and if it belongs to any categories that this 1122module can handle. 1123.Pp 1124The 1125.Va protohandler 1126function actually manipulates 1127the packet to make 1128.Nm 1129correctly NAT it. 1130.Pp 1131When a packet enters 1132.Nm , 1133if it meets a module hook, 1134.Va handler_chain 1135is searched to see if there is an handler that matches 1136this type of a packet (it checks protocol and direction of packet). 1137Then, if more than one handler is found, it starts with the module with 1138the lowest priority number: it calls the 1139.Va fingerprint 1140function and interprets the result. 1141.Pp 1142If the result value is equal to 0 then it calls the protocol handler 1143of this handler and returns. 1144Otherwise, it proceeds to the next eligible module until the 1145.Va handler_chain 1146is exhausted. 1147.Pp 1148Inside 1149.Nm , 1150the module hook looks like this: 1151.Bd -literal -offset indent 1152struct alias_data ad = { 1153 lnk, 1154 &original_address, 1155 &alias_address, 1156 &alias_port, 1157 &ud->uh_sport, /* original source port */ 1158 &ud->uh_dport, /* original dest port */ 1159 256 /* maxpacketsize */ 1160}; 1161 1162\&... 1163 1164/* walk out chain */ 1165err = find_handler(IN, UDP, la, pip, &ad); 1166.Ed 1167.Pp 1168All data useful to a module are gathered together in an 1169.Vt alias_data 1170structure, then 1171.Fn find_handler 1172is called. 1173The 1174.Fn find_handler 1175function is responsible for walking the handler 1176chain; it receives as input parameters: 1177.Bl -tag -width indent 1178.It Fa IN 1179direction 1180.It Fa UDP 1181working protocol 1182.It Fa la 1183pointer to this instance of libalias 1184.It Fa pip 1185pointer to a 1186.Vt "struct ip" 1187.It Fa ad 1188pointer to 1189.Vt "struct alias_data" 1190(see above) 1191.El 1192.Pp 1193In this case, 1194.Fn find_handler 1195will search only for modules registered for 1196supporting INcoming UDP packets. 1197.Pp 1198As was mentioned earlier, 1199.Nm 1200in userland is a bit different, as 1201care must be taken in module handling as well (avoiding duplicate load of 1202modules, avoiding modules with same name, etc.) so 1203.Va dll_chain 1204was introduced. 1205.Pp 1206.Va dll_chain 1207contains a list of all userland 1208.Nm 1209modules loaded. 1210.Pp 1211When an application calls 1212.Fn LibAliasRefreshModules , 1213.Nm 1214first unloads all the loaded modules, then reloads all the modules listed in 1215.Pa /etc/libalias.conf : 1216for every module loaded, a new entry is added to 1217.Va dll_chain . 1218.Pp 1219.Va dll_chain 1220is composed of 1221.Vt "struct dll" 1222entries: 1223.Bd -literal 1224struct dll { 1225 /* name of module */ 1226 char name[DLL_LEN]; 1227 /* 1228 * ptr to shared obj obtained through 1229 * dlopen() - use this ptr to get access 1230 * to any symbols from a loaded module 1231 * via dlsym() 1232 */ 1233 void *handle; 1234 struct dll *next; 1235}; 1236.Ed 1237.Bl -inset 1238.It Va name 1239is the name of the module. 1240.It Va handle 1241is a pointer to the module obtained through 1242.Xr dlopen 3 . 1243.El 1244Whenever a module is loaded in userland, an entry is added to 1245.Va dll_chain , 1246then every protocol handler present in that module 1247is resolved and registered in 1248.Va handler_chain . 1249.Ss HOW TO WRITE A MODULE FOR LIBALIAS 1250There is a module (called 1251.Pa alias_dummy.[ch] ) 1252in 1253.Nm 1254that can be used as a skeleton for future work. 1255Here we analyse some parts of that module. 1256From 1257.Pa alias_dummy.c : 1258.Bd -literal 1259struct proto_handler handlers[] = { 1260 { 1261 .pri = 666, 1262 .dir = IN|OUT, 1263 .proto = UDP|TCP, 1264 .fingerprint = fingerprint, 1265 .protohandler= protohandler, 1266 }, 1267 { EOH } 1268}; 1269.Ed 1270.Pp 1271The variable 1272.Va handlers 1273is the 1274.Dq "most important thing" 1275in a module 1276since it describes the handlers present and lets the outside world use 1277it in an opaque way. 1278.Pp 1279It must ALWAYS be present in every module, and it MUST retain 1280the name 1281.Va handlers , 1282otherwise attempting to load a module in userland will fail and 1283complain about missing symbols: for more information about module 1284load/unload, please refer to 1285.Fn LibAliasRefreshModules , 1286.Fn LibAliasLoadModule 1287and 1288.Fn LibAliasUnloadModule 1289in 1290.Pa alias.c . 1291.Pp 1292.Va handlers 1293contains all the 1294.Vt proto_handler 1295structures present in a module. 1296.Bd -literal 1297static int 1298mod_handler(module_t mod, int type, void *data) 1299{ 1300 int error; 1301 1302 switch (type) { 1303 case MOD_LOAD: 1304 error = LibAliasAttachHandlers(handlers); 1305 break; 1306 case MOD_UNLOAD: 1307 error = LibAliasDetachHandlers(handlers); 1308 break; 1309 default: 1310 error = EINVAL; 1311 } 1312 return (error); 1313} 1314.Ed 1315When running as KLD, 1316.Fn mod_handler 1317registers/deregisters the module using 1318.Fn LibAliasAttachHandlers 1319and 1320.Fn LibAliasDetachHandlers , 1321respectively. 1322.Pp 1323Every module must contain at least 2 functions: one fingerprint 1324function and a protocol handler function. 1325.Bd -literal 1326#ifdef _KERNEL 1327static 1328#endif 1329int 1330fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) 1331{ 1332 1333\&... 1334} 1335 1336#ifdef _KERNEL 1337static 1338#endif 1339int 1340protohandler(struct libalias *la, struct ip *pip, 1341 struct alias_data *ah) 1342{ 1343 1344\&... 1345} 1346.Ed 1347and they must accept exactly these input parameters. 1348.Ss PATCHING AN APPLICATION FOR USERLAND LIBALIAS MODULES 1349To add module support into an application that uses 1350.Nm , 1351the following simple steps can be followed. 1352.Bl -enum 1353.It 1354Find the main file of an application 1355(let us call it 1356.Pa main.c ) . 1357.It 1358Add this to the header section of 1359.Pa main.c , 1360if not already present: 1361.Pp 1362.Dl "#include <signal.h>" 1363.Pp 1364and this just after the header section: 1365.Pp 1366.Dl "static void signal_handler(int);" 1367.It 1368Add the following line to the init function of an application or, 1369if it does not have any init function, put it in 1370.Fn main : 1371.Pp 1372.Dl "signal(SIGHUP, signal_handler);" 1373.Pp 1374and place the 1375.Fn signal_handler 1376function somewhere in 1377.Pa main.c : 1378.Bd -literal -offset indent 1379static void 1380signal_handler(int sig) 1381{ 1382 1383 LibAliasRefreshModules(); 1384} 1385.Ed 1386.Pp 1387Otherwise, if an application already traps the 1388.Dv SIGHUP 1389signal, just add a call to 1390.Fn LibAliasRefreshModules 1391in the signal handler function. 1392.El 1393For example, to patch 1394.Xr natd 8 1395to use 1396.Nm 1397modules, just add the following line to 1398.Fn RefreshAddr "int sig __unused" : 1399.Pp 1400.Dl "LibAliasRefreshModules()" 1401.Pp 1402recompile and you are done. 1403.Ss LOGGING SUPPORT IN KERNEL LAND 1404When working as KLD, 1405.Nm 1406now has log support that 1407happens on a buffer allocated inside 1408.Vt "struct libalias" 1409(from 1410.Pa alias_local.h ) : 1411.Bd -literal 1412struct libalias { 1413 ... 1414 1415 /* log descriptor */ 1416#ifdef KERNEL_LOG 1417 char *logDesc; /* 1418 * ptr to an auto-malloced 1419 * memory buffer when libalias 1420 * works as kld 1421 */ 1422#else 1423 FILE *logDesc; /* 1424 * ptr to /var/log/alias.log 1425 * when libalias runs as a 1426 * userland lib 1427 */ 1428#endif 1429 1430 ... 1431} 1432.Ed 1433so all applications using 1434.Nm 1435will be able to handle their 1436own logs, if they want, accessing 1437.Va logDesc . 1438Moreover, every change to a log buffer is automatically added to 1439.Xr syslog 3 1440with the 1441.Dv LOG_SECURITY 1442facility and the 1443.Dv LOG_INFO 1444level. 1445.Sh AUTHORS 1446.An Charles Mott Aq cm@linktel.net , 1447versions 1.0 - 1.8, 2.0 - 2.4. 1448.An Eivind Eklund Aq eivind@FreeBSD.org , 1449versions 1.8b, 1.9 and 2.5. 1450Added IRC DCC support as well as contributing a number of architectural 1451improvements; added the firewall bypass for FTP/IRC DCC. 1452.An Erik Salander Aq erik@whistle.com 1453added support for PPTP and RTSP. 1454.An Junichi Satoh Aq junichi@junichi.org 1455added support for RTSP/PNA. 1456.An Ruslan Ermilov Aq ru@FreeBSD.org 1457added support for PPTP and LSNAT as well as general hacking. 1458.An Gleb Smirnoff Aq glebius@FreeBSD.org 1459ported the library to kernel space. 1460.An Paolo Pisati Aq piso@FreeBSD.org 1461made the library modular, moving support for all 1462protocols (except for IP, TCP and UDP) to external modules. 1463.Sh ACKNOWLEDGEMENTS 1464Listed below, in approximate chronological order, are individuals who 1465have provided valuable comments and/or debugging assistance. 1466.Bd -ragged -offset indent 1467.An -split 1468.An Gary Roberts 1469.An Tom Torrance 1470.An Reto Burkhalter 1471.An Martin Renters 1472.An Brian Somers 1473.An Paul Traina 1474.An Ari Suutari 1475.An Dave Remien 1476.An J. Fortes 1477.An Andrzej Bialecki 1478.An Gordon Burditt 1479.Ed 1480