File: restricted-webinterface.xml

package info (click to toggle)
crossroads 2.65-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,664 kB
  • ctags: 355
  • sloc: cpp: 4,212; perl: 1,658; xml: 269; makefile: 186; sh: 46
file content (50 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (3)
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
<!-- This is an example of an XR configuration that limits the access
     to the web interface to one address. -->

<?xml version="1.0" encoding="UTF-8">

<configuration>
  <system>
    <uselogger>false</uselogger>
    <logdir>/tmp</logdir>
  </system>

  <service>
    <!-- This is the main service that XR is responsible for.
         The local web interface runs on port 11.001 but is accessible
         only from localhost (127.0.0.1). The sample service runs on
         port 11.000 and is accessible from wherever you like. -->
    <name>web</name>
    <server>
      <type>tcp</type>
      <address>0:11000</address>
      <webinterface>127.0.0.1:11001</webinterface>
      <verbose>yes</verbose>
    </server>

    <backend>
      <address>server1:8000</address>
    </backend>
  </service>

  <service>
    <!-- Here's a forwarder that runs on port 11.002 and only accepts
         traffic from IP address 10.50.45.189. The calls are
         dispatched to localhost:11.001, so that this way, the web
         interface is only accessible via:
         a. port 11.001 from localhost, or
         b. port 11.002 from 10.50.45.189 -->
    <name>webinterface</name>
    <server>
      <type>tcp</type>
      <address>0:11002</address>
      <acl>
        <allowfrom>10.50.45.189</allowfrom>
      </acl>
    </server>
    <backend>
      <address>localhost:11001</address>
    </backend>
  </service>
  
</configuration>