Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-mod-network: add support for creating cname records #6335

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

arbolitoloco1
Copy link
Contributor

I used the MX and SRV tabs as templates to create a new tab where users can create cname records in dnsmasq, using the cname and target options.

@ErwanMAS
Copy link

@hnyman @jow- @Zeranoe @feckert hey can someone take a look on this , this is very useful when you want to rewrite/shadow public DNS .

from DNSMASQ man pages :

addresses in /etc/hosts will "shadow" different addresses for the same names in the upstream DNS, so "mycompany.com 1.2.3.4" in /etc/hosts will ensure that queries for "mycompany.com" always return 1.2.3.4 even if queries in the upstream DNS would otherwise return a different address. There is one exception to this: if the upstream DNS contains a CNAME which points to a shadowed name, then looking up the CNAME through dnsmasq will result in the unshadowed address associated with the target of the CNAME. To work around this, add the CNAME to /etc/hosts so that the CNAME is shadowed too.

@@ -694,6 +695,27 @@ return view.extend({
so.datatype = 'range(0,65535)';
so.placeholder = '0';

o = s.taboption('cnamehosts', form.SectionValue, '__cname__', form.TableSection, 'cname', null,
('Set an alias for a hostname.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be like so?:

			_('Set an alias for a hostname.'));

@arbolitoloco1
Copy link
Contributor Author

arbolitoloco1 commented Aug 5, 2023

Sorry, yeah, I think so. just fixed it!

@arbolitoloco1
Copy link
Contributor Author

This is how it looks on my router currently, with the underscore added.
image

This commit adds a tab that allows creating CNAME records

Signed-off-by: Santiago Kozak <santikzk1406@gmail.com>
@arbolitoloco1 arbolitoloco1 reopened this Aug 5, 2023
@arbolitoloco1
Copy link
Contributor Author

I messed up in a horrendous way but I think this is good now (unless the test build fails). Sorry for all the mess

@systemcrash
Copy link
Contributor

systemcrash commented Aug 5, 2023 via email

@arbolitoloco1
Copy link
Contributor Author

arbolitoloco1 commented Aug 5, 2023

I did:
git reset --soft HEAD~1, where 1 means remove 1 commit
git push origin +patch-4

found it on https://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-github in the middle of my desperation lol

@systemcrash
Copy link
Contributor

systemcrash commented Aug 5, 2023 via email

@hnyman hnyman merged commit 503ae00 into openwrt:master Aug 5, 2023
4 checks passed
@arbolitoloco1 arbolitoloco1 deleted the patch-4 branch August 5, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants