如何得到旁遮普/扭曲绕过dns [英] How to get punjab/twisted to bypass dns

查看:223
本文介绍了如何得到旁遮普/扭曲绕过dns的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用一个双冲刺BOSH服务器与开发XMPP服务器配合使用。旁遮普人尝试对XMPP域进行SRV DNS查找,这在DNS基础结构中不存在。有没有办法配置旁遮普语以将请求myserver.mydomain.com路由到IP地址?我无法在XML级别访问xmpp:route属性,所以这必须以punjab / twisted配置的方式进行。

I am trying to get a punjab BOSH server to work with a development XMPP server. punjab is trying to do a SRV DNS lookup of the XMPP domain, which is not present in our DNS infrastructure. Is there any way I configure punjab to route requests for "myserver.mydomain.com" to an IP address? I do not have access to the xmpp:route attribute at the XML-level, so this would have to be done somehow by punjab/twisted configuration.

推荐答案

作为一个快速的黑客,让您开始运行,请安装 dnsmasq ,将以下内容添加到配置文件中:

As a quick hack to get you up and running, install dnsmasq, add the following to the config file:

srv-host=_xmpp-client._tcp.myserver.mydomain.com,localhost,5222,0
# use your DNS server here instead of 8.8.8.8, which is Google's
server=8.8.8.8

启动dnsmasq。我建议从 sudo dnsmasq -dq 开始,以便您可以看到调试输出并诊断任何问题。

Start dnsmasq. I recommend starting with sudo dnsmasq -dq to start with, so you can see the debug output and diagnose any problems.

修改网络配置,使用127.0.0.1作为DNS服务器。例如,检查您的操作系统,将 resolv.conf 设置为:

Modify your network configuration to use 127.0.0.1 as your DNS server. E.g., but check for your OS, set resolv.conf to:

nameserver 127.0.0.1

这将在您的盒子上本地运行一个小的DNS解析器,服务器上SRV本地记录,并将其他所有内容转发到您的上游DNS服务器。

This will run a small DNS resolver locally on your box, server up the one SRV record locally, and forward everything else to your upstream DNS server.

这篇关于如何得到旁遮普/扭曲绕过dns的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆