Differences
This shows you the differences between two versions of the page.
|
doc:howto:xmpp.server [2012/12/05 20:08] nilfred DDNS and DHCP config example |
doc:howto:xmpp.server [2013/03/28 03:30] (current) nilfred Split DDNS from dhcp domain and add SRV records |
||
|---|---|---|---|
| Line 166: | Line 166: | ||
| </code> | </code> | ||
| - | ==== Set your router the same LAN name as WAN ==== | + | ==== Set your router a DDNS name ==== |
| - | It would be wise if your router has the same name for LAN clients, so has to not go out and redirected back. | + | After reading somewhere else how to setup DDNS, you should end with something like this working configuration: |
| <code bash> | <code bash> | ||
| uci batch <<'EOF' | uci batch <<'EOF' | ||
| Line 179: | Line 179: | ||
| set ddns.myddns.service_name=no-ip.com | set ddns.myddns.service_name=no-ip.com | ||
| set ddns.myddns.username=username | set ddns.myddns.username=username | ||
| + | commit ddns | ||
| + | EOF | ||
| + | </code> | ||
| + | ==== Set your router the same LAN name as WAN ==== | ||
| + | It would be wise if your router has the same name for LAN clients, so has to not go out and redirected back. | ||
| + | <code bash> | ||
| + | uci batch <<'EOF' | ||
| add dhcp domain | add dhcp domain | ||
| set dhcp.@domain[-1].ip=192.168.1.1 | set dhcp.@domain[-1].ip=192.168.1.1 | ||
| Line 188: | Line 195: | ||
| set dhcp.@domain[-1].ip=192.168.1.1 | set dhcp.@domain[-1].ip=192.168.1.1 | ||
| set dhcp.@domain[-1].name=example.no-ip.biz | set dhcp.@domain[-1].name=example.no-ip.biz | ||
| - | commit ddns | ||
| commit dhcp | commit dhcp | ||
| EOF | EOF | ||
| Line 200: | Line 206: | ||
| </code> | </code> | ||
| Your router now has a name! | Your router now has a name! | ||
| + | ==== Set your own domain name SRV records ==== | ||
| + | Very well! So, for your own domain name may need to setup SRV records if the xmpp server run in another subdomain like this: | ||
| + | <code> | ||
| + | _xmpp-client._tcp.example.com. 18000 IN SRV 0 5 5222 xmpp.example.com. | ||
| + | _xmpp-server._tcp.example.com. 18000 IN SRV 0 5 5269 xmpp.example.com. | ||
| + | </code> | ||
| + | Translated to uci will look like this: | ||
| + | <code bash> | ||
| + | uci batch <<'EOF' | ||
| + | add dhcp srvhost | ||
| + | set dhcp.@srvhost[-1].srv=_xmpp-client._tcp.example.com | ||
| + | set dhcp.@srvhost[-1].target=xmpp.example.com | ||
| + | set dhcp.@srvhost[-1].port=5222 | ||
| + | set dhcp.@srvhost[-1].class=0 | ||
| + | set dhcp.@srvhost[-1].weight=5 | ||
| + | add dhcp srvhost | ||
| + | set dhcp.@srvhost[-1].srv=_xmpp-server._tcp.example.com | ||
| + | set dhcp.@srvhost[-1].target=xmpp.example.com | ||
| + | set dhcp.@srvhost[-1].port=5269 | ||
| + | set dhcp.@srvhost[-1].class=0 | ||
| + | set dhcp.@srvhost[-1].weight=5 | ||
| + | commit dhcp | ||
| + | EOF | ||
| + | </code> | ||
| + | This DNS trick is for someone@xmpp.example.com looks like someone@example.com, but also for fancy names like this full picture: | ||
| + | <code> | ||
| + | # A record | ||
| + | your-server.EXAMPLE.COM IN A 1.2.3.4 # this *must* be an A record and not a CNAME | ||
| + | |||
| + | # CNAME records | ||
| + | anon.EXAMPLE.COM IN CNAME your-server.EXAMPLE.COM. # this is what the anonymous binding (non-logged in web users) will connect to | ||
| + | topics.EXAMPLE.COM IN CNAME your-server.EXAMPLE.COM. # to enable channels like food@topics.EXAMPLE.COM | ||
| + | |||
| + | # SRV records | ||
| + | _xmpp-client._tcp.EXAMPLE.COM. IN SRV 5 0 5222 your-server.EXAMPLE.COM. | ||
| + | _xmpp-server._tcp.EXAMPLE.COM. IN SRV 5 0 5269 your-server.EXAMPLE.COM. | ||
| + | _xmpp-server._tcp.anon.EXAMPLE.COM IN SRV 5 0 5269 your-server.EXAMPLE.COM. | ||
| + | _xmpp-server._tcp.topics.EXAMPLE.COM IN SRV 5 0 5269 your-server.EXAMPLE.COM. | ||
| + | </code> | ||
| ===== Upgrade to prosody 0.8.2 ===== | ===== Upgrade to prosody 0.8.2 ===== | ||
doc/howto/xmpp.server.1354734527.txt.bz2 · Last modified: 2012/12/05 20:08 by nilfred
