Code Monkey home page Code Monkey logo

minidyndns's People

Contributors

arkanis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minidyndns's Issues

Ruby server stops unexpectedly due to strange request parsing error

Here is the message error:

2018-08-13 23:59:29 HTTP: GET http://www.bing.com -> not authorized
2018-08-13 23:59:55 DNS: ANY com -> wrong domain, ignoring
2018-08-14 00:52:58 DNS: Failed to parse request: undefined method `>>' for false:FalseClass
        dns.rb:269:in `parse_dns_question'
        dns.rb:186:in `handle_dns_packet'
        dns.rb:692:in `block in <main>'
        dns.rb:689:in `loop'
        dns.rb:689:in `<main>'
dns.rb:193:in `handle_dns_packet': undefined method `end_with?' for nil:NilClass (NoMethodError)
        from dns.rb:692:in `block in <main>'
        from dns.rb:689:in `loop'
        from dns.rb:689:in `<main>'

Any idea how to solve this? Thank you.

Consider checking if current IP in record had changed or remained the same and thus avoid unnecessary disk writes to db.yml file

I have noticed that the db.yml file is updated every time an update request is sent to the server, even if the IP in record had not changed. Maybe it is better to check if the IP had changed or not and only if it has a new value write it to the disk and update the db.yml file.

Here is a code modification suggestion inside handle_http_connection method, needs review:

	if ip.ipv4? and $db[user]["A"] != ip_as_string
		log "New IP address detected, updating the database file.."
		$db["SERIAL"] += 1
		save_db
	elsif ip.ipv6? and $db[user]["AAAA"] != ip_as_string
		log "New IP address detected, updating the database file.."
		$db["SERIAL"] += 1
		save_db
	else
	end

Not working

2017-03-22 04:43:21 DNS: A @ -> not found

Why?

My settings:

# The domain hosted by this DNS server. It will only reply to requests
# regarding subdomains of this domain. Everything is ignored completely.
domain: lepreip.censured.it
# Time to live (TTL) of replies send by the DNS server. This is the time
# in seconds an reply stays valid. The higher the value the longer clients
# might take to figure out that an IP address has changed. Small values
# will force a DNS request on every page access. This is ok for seldomly
# used sites but a very bad idea for high traffic sites.
ttl: 15

# IP and port the DNS server runs on
dns:
  port: 5352
  ip: 0.0.0.0
# IP and port the HTTP server runs on
http:
  port: 8082
  ip: 0.0.0.0
https:
  port: 443
  ip: 0.0.0.0
  cert: server_cert.pem
  priv_key: server_priv_key.key
# To disable HTTPS set it to false
https: false

# Maximum number of seconds the server waits for clients to send
# the entire HTTP request (to kill requests from stupid routers that
# keep the connections open forever).
http_timeout: 5.0

# The server needs to be started as root to bind to privileged ports
# (everything below 1024). In that case it will drop privileges after
# startup and run under the user and group specified here.
# Make sure that this user can write the database file (default db.yml),
# otherwise the server can't update the database.
user: mauro
group: nogroup

# Start of authority information. This is stuff others like to know about
# this DNS server. The serial is taken from the DB.
soa:
  # The domain name of our DNS server itself
  nameserver: ddns.censured.it
  # Mail address of the person responsible for the DNS server
  mail: [email protected]
  # Time to live in seconds of this SOA record. It won't change often so
  # it can be a rather large value (e.g. 86400 = 1 day).
  ttl: 86400
  # Stuff for secondary DNS servers. Since we're just a small DNS server
  # secondaries don't make sense. So just the default values.
  refresh_time: 86400
  retry_time: 7200
  expire_time: 3600000
  # Time not found responses (NXDOMAIN) can be cached. This is the maximum
  # time a newly added domain might need to be available world wide.
  negative_caching_ttl: 172800

ivp6 request times out

Hi,
I did a git pull today, and since then ipv6 requests seem to time out

When I try dig home.dyn.xxx.org A it works perfectly fine. If I try AAAA i get:

dig home.dyn.xxx.org AAAA

; <<>> DiG 9.10.3-P4-Ubuntu <<>> home.dyn.xxx.org AAAA
;; global options: +cmd
;; connection timed out; no servers could be reached

weirdly the request seems to reach the server and is being answered, at least that's what the log says:

2017-01-10 13:57:16 DNS: AAAA home -> 2a02:xx:xx:xx:xx:xx:xx:xx
2017-01-10 13:57:17 DNS: AAAA home -> 2a02:xx:xx:xx:xx:xx:xx:xx
2017-01-10 13:57:22 DNS: AAAA home -> 2a02:xx:xx:xx:xx:xx:xx:xx
2017-01-10 13:57:29 DNS: AAAA home -> 2a02:xx:xx:xx:xx:xx:xx:xx

Do you see any reason for this? It worked fine before

Server hangs every few days

Hi,

unfortunately the ruby process seems to hang every few days and needs to be restarted. Do you have some kind of init.d service script, so that I could just run /etc/init.d/minidyndns restart every night?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.