[Buildbot-devel] Binding to a specific interface

Brian Warner warner-buildbot at lothar.com
Tue Nov 9 18:56:18 UTC 2004


> How do I tell the BuildBot master waterfall web server to bind to, say, 
> 127.0.0.1, instead of all interfaces?

You'll need to patch buildbot/status/html.py, in the very last function of
that file (Waterfall.setup). There's a place where it does:

        if self.http_port is not None:
            s = internet.TCPServer(self.http_port, self.site)
            s.setServiceParent(self)

Just add an 'interface="127.0.0.1"' argument to the TCPServer call:

        if self.http_port is not None:
            s = internet.TCPServer(self.http_port, self.site,
                                   interface="127.0.0.1")
            s.setServiceParent(self)

I'm pretty sure interface= takes an IP address, but it not you might try
using interface="lo" instead.

If this seems generally useful enough, we could add an argument to Waterfall
to let you do this from the config file without patching the source. Let me
know what you think.

cheers,
 -Brian




More information about the devel mailing list