rbndr
rbndr copied to clipboard
How do I set up my own service?
Hi, this is a great service, thanks so much. but how can I set up my own?
The domain name rbndr.us
is hard-coded in rebinder.c. In order to set up your own working version, you need two things:
- An NS record for a domain or subdomain you own.
- A modified
rebinder.c
which is set up to handle your domain.
Let's say I own juggle.nu
, and I want to use it for a rebinder service. I host this on the machine ns0.juggle.nu
. In the DNS setup of juggle.nu
, I set up an NS record, indicating that ns0.juggle.nu
is the domain name server of this domain.
On the machine ns0
, I run rbndr which I have modified as follows:
...
struct __packed root {
struct __packed {
uint8_t len; // 6
uint8_t data[6]; // 'j' 'u' 'g' 'g' 'l' 'e'
} domain;
struct __packed {
uint8_t len; // 2
uint8_t data[2]; // 'n' 'u'
} tld;
uint8_t root; // 0
};
static const struct root kExpectedDomain = {
.domain = { 6, { 'j', 'u', 'g', 'g', 'l', 'e' } },
.tld = { 2, { 'n', 'u' } },
.root = 0,
};
Take careful note, that the len
fields and the sizes of the data
fields have been altered to fit the length of each text string. juggle
is six characters, therefore domain.len=6
and domain.data[]
is of size 6.
With these modifications, I'll be able to query the rebinder and see the results:
On ns0.juggle.nu
$ gcc rebinder.c -o rebinder
$ sudo ./rebinder
Test it from the same machine:
$ dig @localhost 7f000001.c0a80001.juggle.nu
$ dig @localhost 7f000001.c0a80001.juggle.nu
$ dig @localhost 7f000001.c0a80001.juggle.nu
$ dig @localhost 7f000001.c0a80001.juggle.nu
$ dig @localhost 7f000001.c0a80001.juggle.nu
Some of the requests will come back as 127.0.0.1
and some as 192.168.0.1
You can also do this with a subdomain rather than the whole of juggle.nu
, but it requires more modification to the root
struct.
The domain name
rbndr.us
is hard-coded in rebinder.c. In order to set up your own working version, you need two things:
- An NS record for a domain or subdomain you own.
- A modified
rebinder.c
which is set up to handle your domain.Let's say I own
juggle.nu
, and I want to use it for a rebinder service. I host this on the machinens0.juggle.nu
. In the DNS setup ofjuggle.nu
, I set up an NS record, indicating thatns0.juggle.nu
is the domain name server of this domain.On the machine
ns0
, I run rbndr which I have modified as follows:... struct __packed root { struct __packed { uint8_t len; // 6 uint8_t data[6]; // 'j' 'u' 'g' 'g' 'l' 'e' } domain; struct __packed { uint8_t len; // 2 uint8_t data[2]; // 'n' 'u' } tld; uint8_t root; // 0 }; static const struct root kExpectedDomain = { .domain = { 6, { 'j', 'u', 'g', 'g', 'l', 'e' } }, .tld = { 2, { 'n', 'u' } }, .root = 0, };
Take careful note, that the
len
fields and the sizes of thedata
fields have been altered to fit the length of each text string.juggle
is six characters, thereforedomain.len=6
anddomain.data[]
is of size 6.With these modifications, I'll be able to query the rebinder and see the results:
On
ns0.juggle.nu
$ gcc rebinder.c -o rebinder $ sudo ./rebinder
Test it from the same machine:
$ dig @localhost 7f000001.c0a80001.juggle.nu $ dig @localhost 7f000001.c0a80001.juggle.nu $ dig @localhost 7f000001.c0a80001.juggle.nu $ dig @localhost 7f000001.c0a80001.juggle.nu $ dig @localhost 7f000001.c0a80001.juggle.nu
Some of the requests will come back as
127.0.0.1
and some as192.168.0.1
You can also do this with a subdomain rather than the whole of
juggle.nu
, but it requires more modification to theroot
struct.
And how you can do it with a subdomain?