📄 sockd.route.5
字号:
.TH SOCKD.ROUTE 5 "November 17, 1993".SH NAMEsockd.route \- Routing file for multi-homed SOCKS proxy server.SH SYNOPSIS\fB/etc/sockd.route\fP.SH DESCRIPTIONThe file \fB/etc/sockd.route\fP is used by a multi-homed SOCKS server\fIsockd\fP to determine which of its network interfaces it shoulduse to reach a given destination host.A multi-homed host is a host with more than one network interfacesand with its IP_FORWARDING turned off. Only the multi-homed version of\fIsockd\fP can be run on such hosts. Hosts which have a singlenetwork interface or that have enabled IP_FORWARDING -- evenwith multiple network interfaces -- can run the single-homed versionof \fIsockd\fP, which requires no use of \fB/etc/sockd.route\fP.A line in the file can be up to 1024 characters long. Lines startingwith a `#' are comments. Non-comment lines must be of the form\fIif_addr dst_addr dst_mask\fRAll three fields are required and are separated by spaces or tabs.Each filed is specified in the usual dotted form of IP addresses,e.g., 128.23.16.2.\fIif_addr\fR must be the IP address of one of the network interfaceson the SOCKS server host. The \fIdst_addr dst_mask\fR pair togetherspecify the destination IP address or a range of destination IPaddresses. Bits in \fIdst_mask\fP that are set to 0 indicate thebit positions to be ignored during comparison of IP addresses. So,specifying 255.255.255.255 in \fIdst_mask\fP demands an exact matchwith \fIdst_addr\fP, whereas 0.0.0.0 in \fIdst_mask\fP causes amatching with any given destination address regardless of what isspecified for \fIdst_addr\fP.When a multi-homed \fIsockd\fP receives a network request, it firstchecks with \fB/etc/sockd.conf\fP to decide whether the requestshould be allowed or denied. For an allowable request, \fIsockd\fPthen checks the given destination IP address against the \fIdst_addrdst_mask\fP pair in \fB/etc/sockd.route\fP, one line at a line. Oncea match is found, the network interface of the corresponding\fIif_addr\fR field is used for connection to the destination host.Remaining lines in the file are skipped. Therefore the order of thelines in the file is of extreme importance. If no match is foundthroughout the file, a line indicating the error is produced using\fIsyslog\fP with facility \fBdaemon\fP and level \fIerr\fP and\fIsockd\fP then terminates.The program \fItest_sockd_conf\fP checks \fB/etc/sockd.conf\fR as wellas the regular configuration file \fB/etc/sockd.conf\fP.See \fItest_sockd_conf\fP(8)..SH EXAMPLESSuppose you have a dual-homed host with interface 129.1.2.3 connectingto your internal Class B network 129.1, and interface 129.1.254.1connecting to the outside world. If you only use the SOCKS serverto provide connections to outside hosts, then the file \fB/etc/sockd.route\fPonly needs one line:.nf.+1129.1.254.1 0.0.0.0 0.0.0.0.fi.-1If you also use the SOCKS server to provide connection to internalhosts as well, then two lines would suffice:.nf.+1129.1.2.3 129.1.0.0 255.255.0.0129.1.254.1 0.0.0.0 0.0.0.0.fi.-1Note that these two lines must be in the order given above..SH SEE ALSO\fIsockd\fP(8), \fIsockd.route\fP(5), \fItest_sockd_conf\fP(8),\fIsocks.conf\fP(5), \fIsocks_clients\fP(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -