summaryrefslogtreecommitdiff
path: root/pod/nginx/ngx_stream_realip_module.pod
blob: 407fc72e13377b3f0beba6a42a20f6d113cd3db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
=encoding utf-8

=head1 NAME

ngx_stream_realip_module - Module ngx_stream_realip_module




=head1



The C<ngx_stream_realip_module> module is used
to change the client address and port
to the ones sent in the PROXY protocol header (1.11.4).
The PROXY protocol must be previously enabled by setting the
L<ngx_stream_core_module> parameter
in the C<listen> directive.





This module is not built by default, it should be enabled with the
C<--with-stream_realip_module>
configuration parameter.




=head1 Example Configuration




    
    listen 12345 proxy_protocol;
    
    set_real_ip_from  192.168.1.0/24;
    set_real_ip_from  192.168.2.1;
    set_real_ip_from  2001:0db8::/32;






=head1 Directives

=head2 set_real_ip_from


B<syntax:> set_real_ip_from I<
    I<C<address>> E<verbar>
    I<C<CIDR>> E<verbar>
    C<unix:>>



B<context:> I<stream>


B<context:> I<server>





Defines trusted addresses that are known to send correct
replacement addresses.
If the special value C<unix:> is specified,
all UNIX-domain sockets will be trusted.







=head1 Embedded Variables




=over



=item C<$realip_remote_addr>




keeps the original client address



=item C<$realip_remote_port>




keeps the original client port




=back