LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-19-2010, 01:16 PM   #1
rock_ya_baby
LQ Newbie
 
Registered: May 2004
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Redirect local DNS query to remote DNS server on non standard port?


The issue is that my CentOS workstation is in a vlan from where the Intranet's DNS servers are unreachable.

For browsing the web there is an ISA proxy server, which I presume resolves DNS for my firefox. However, wget, host, ping and aria2c fail to get any sort of DNS resolution since they're being run from command line.

I have exported HTTP_PROXY value, which provides me internet access on console, but,only when I connect using IP address. It fails on name resolution.


--

My question is:

May I redirect the DNS queries to my home PC which would be running a DNS server on a non standard port?


I was thinking of putting

nameserver 127.0.0.1 in /etc/resolv.conf

and then put iptables rule to redirect 127.0.0.1:53 UDP to a.public.ip.address:3535 UDP

I don't know if I am shooting blanks or what, I am not very much aware of this kind of setup.

--

My main need is to provide DNS resolution to console apps.

I want to utilize my company's idle bandwidth for bulk downloads, so, using proxy, SSH tunneling through my Home PC is out of question.

Any ideas that I can read upon?

Last edited by rock_ya_baby; 02-19-2010 at 01:21 PM.
 
Old 02-19-2010, 01:58 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It sounds as if you have an http proxy working and what you need is a command line proxy.

You might want to have a look at this article to see if it helps you do that (I haven't done this myself but it looks like it may be what you need):

http://www.aboutdebian.com/proxy.htm

P.S. But iptables exists on other distros so it can probably be adapted fairly easily.
 
Old 02-20-2010, 11:52 AM   #3
rock_ya_baby
LQ Newbie
 
Registered: May 2004
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
^ I thought I made my query simple

Well, I don't require help in setting up HTTP proxy for command line, that I already have. Please read the post once again.
 
0 members found this post helpful.
Old 02-20-2010, 12:00 PM   #4
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
why hack iptables rules? why use unstandard port for DNS? It is not meant to be installed on other port than 53, like some other standard internet services. i think a better solution will be configure iptables on your home pc allowing only your company external IP/subnet to interact with your port 53. isn't that a good idea?
 
Old 02-20-2010, 11:22 PM   #5
rock_ya_baby
LQ Newbie
 
Registered: May 2004
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
The reason behind running it on different port on my home PC is because outgoing 53 is blocked at my work place.

My requirement is only to resolve DNS using a server which is outside my office network and hopefully running DNS on some other port than 53.
 
Old 02-21-2010, 06:25 AM   #6
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
Oh... then the only idea I have here is to use a tool like openvpn or something.
Out of other ideas.
Interesting question.
It better fits in "Networking" forum.

Last edited by Web31337; 02-21-2010 at 06:27 AM.
 
Old 02-22-2010, 08:31 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by rock_ya_baby View Post
^ I thought I made my query simple

Well, I don't require help in setting up HTTP proxy for command line, that I already have. Please read the post once again.
I didn't suggest an "http" proxy. Maybe YOU should read once again.

Better yet just blow it out your wazoo.

Last edited by MensaWater; 02-22-2010 at 08:49 AM.
 
Old 04-13-2010, 04:06 AM   #8
sowmika
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Spam removal.

Last edited by GrapefruiTgirl; 05-07-2010 at 07:37 AM. Reason: Spam removal.
 
Old 04-13-2010, 04:31 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
@OP
Quote:
The reason behind running it on different port on my home PC is because outgoing 53 is blocked at my work place.

My requirement is only to resolve DNS using a server which is outside my office network and hopefully running DNS on some other port than 53.
You can use forwarders:
Code:
forward only;
forwarders {x.x.x.x port yy;};
 
  


Reply

Tags
bypass, dns, proxy, redirect, restriction, socks, tunnel



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Server: How to Redirect to MY DNS SERVER? Dimitriy Linux - Networking 1 06-14-2006 05:47 AM
DNS configuration: How 2 change from local to remote nameservers Kropotkin Fedora 3 05-31-2005 01:22 PM
Clients won't query DNS server BruceC Linux - Newbie 3 10-06-2004 08:43 AM
Help needed regarding DNS server query myself_rajat Linux - Networking 8 08-16-2004 06:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration