Re: Disable Relayd's error message

Previous thread: Re: hp6930p insane acpitz1 and non working keyboard after halt -p by Theo de Raadt on Friday, August 13, 2010 - 7:35 am. (3 messages)

Next thread: Re: MTA choice by Dave Anderson on Friday, August 13, 2010 - 8:34 am. (4 messages)
From: Keith
Date: Friday, August 13, 2010 - 7:41 am

I just realized that if I telnet to our web servers on port 80 and press 
enter a few times that I get a reply back from relayd that I didn't 
expect "<address>OpenBSD relayd at 127.0.0.1 port 8080</address>" This 
error is correct as we use a PF rdr rule to redirect traffic on our 
firewall to localhost port 8080 where we have relayd listening. I was 
wondering if it's possible to stop this error from being displayed as I 
would prefer not to disclose to the world what software we use.

I've had a look at our  relayd.conf  to see if there is a "return error" 
line but there isn't and I can't see any other way of stopping this 
error from being displayed. Does anyone have any suggestions ?

Thanks
Keith

HTTP/1.x 406 Not Acceptable
Date: Fri Aug 13 15:20:18 2010
Server: OpenBSD relayd
Connection: close
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>406 Not Acceptable</title>
<style type="text/css"><!--  body { background-color:#a00000; color: 
white; }--></style>
</head>
<body>
<h1>Not Acceptable</h1>
<div id='m'>no method</div>
<div id='l'></div>
<hr><address>OpenBSD relayd at 127.0.0.1 port 8080</address>
</body>
</html>

From: Bret S. Lambert
Date: Friday, August 13, 2010 - 7:58 am

Yes; the function you're looking for is relay_close_http(), in relay.c

You'll also have to hack the support for setting the string in parse.y

Of course, you could just redefine RELAYD_SERVERNAME in relayd.h, but

From: Kevin Chadwick
Date: Friday, August 13, 2010 - 9:17 am

On Fri, 13 Aug 2010 16:58:46 +0200

You can set return error in relayd.conf to blank or comment it out, I
can't remember which. You'll then get a blank error page though which
may confuse users, so if you want to customise the text other than the
style I believe you'll need to edit the source as shown.

Previous thread: Re: hp6930p insane acpitz1 and non working keyboard after halt -p by Theo de Raadt on Friday, August 13, 2010 - 7:35 am. (3 messages)

Next thread: Re: MTA choice by Dave Anderson on Friday, August 13, 2010 - 8:34 am. (4 messages)