Networking Forums

Networking Forums > Computer Networking > Linux Networking > resolving all dns though a binary

Reply
Thread Tools Display Modes

resolving all dns though a binary

 
 
xask: Deepak Mishra
Guest
Posts: n/a

 
      08-25-2007, 05:34 PM
is it possible that all the DNS requests are replied to by an
executable '/bin/proxyresolv' ?
Deepak

 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      08-26-2007, 04:38 AM
On Aug 25, 10:34 am, "xask: Deepak Mishra" <xask.li...@gmail.com>
wrote:
> is it possible that all the DNS requests are replied to by an
> executable '/bin/proxyresolv' ?
> Deepak


Your question is meaningless. All DNS requests on the planet? All DNS
requests that originate on a particular machine? Is the executable
running on that same machine?

You need to start out by telling us what you want to happen, not one
way to accomplish it.

DS

 
Reply With Quote
 
xask: Deepak Mishra
Guest
Posts: n/a

 
      08-26-2007, 10:20 AM
Er ! sorry i thought it would make it easier for people to understand
-
here is what i want to do,

I have a machine on a LAN (192.168.1.x). There is a squid proxy server
running on the server 192.168.1.2 through which i can access the
internet.
Now this machine does not run a DNS server so i can't resolve
hostnames to dns addresses.
So I tried different softwares and found - proxychains
it has an executable 'proxyresolv' which can resolve hostnames
eg -
# proxyresolv google.com
64.x.x.x ...

where as running
# resolveip google.com
fails because i dont have a name server on my LAN !
so my question is , Is it possible to make all my programs resolve DNS
names using this executable 'proxyresolv'

I hope this is much clearer
Deepak


 
Reply With Quote
 
Jamin Davis
Guest
Posts: n/a

 
      08-26-2007, 11:02 PM
xask: Deepak Mishra <(E-Mail Removed)> wrote:

> I have a machine on a LAN (192.168.1.x). There is a squid proxy server
> running on the server 192.168.1.2 through which i can access the
> internet.
> Now this machine does not run a DNS server so i can't resolve
> hostnames to dns addresses.
> So I tried different softwares and found - proxychains
> it has an executable 'proxyresolv' which can resolve hostnames
> eg -
> # proxyresolv google.com
> 64.x.x.x ...


So the machine running Squid is doing DNS lookups for you when you request,
say, webpages via the proxy - and you want to use that functionality
outside of Squid? proxyresolv can do this but 'normal' lookup fails because
you haven't got a DNS server.. no, I don't think you can. Surely it's
easier to just install a forwarding DNS server on the proxy server and/or
SNAT connections to port 53 on your ISPs DNS server.. maybe you already
have this setup. In that case you can just use "nameserver x.x.x.x" on your
client in /etc/hosts.

> I hope this is much clearer


I hope I understood correctly!.

--
Jamin @ Home: Chester UK -<(E-Mail Removed)>

 
Reply With Quote
 
xask: Deepak Mishra
Guest
Posts: n/a

 
      08-27-2007, 06:04 AM
> So the machine running Squid is doing DNS lookups for you when you request,
> say, webpages via the proxy - and you want to use that functionality
> outside of Squid? proxyresolv can do this but 'normal' lookup fails because
> you haven't got a DNS server.. no, I don't think you can. Surely it's
> easier to just install a forwarding DNS server on the proxy server and/or
> SNAT connections to port 53 on your ISPs DNS server.. maybe you already
> have this setup. In that case you can just use "nameserver x.x.x.x" on your
> client in /etc/hosts.


You see proxyresolv works by tunneling DNS requests through TCP rather
than UDP and then simply tunnels the connection through a proxy
server.

proxyresolv is a simple shell script which -
preload the proxy tunneling library xxxx.so
then executes for eg. - 'dig @4.2.2.2 +tcp google.com' and uses awk to
print out only the ip addresses.

Now do you see something ?
I could force all DNS requests though a TCP connection and then
preload the proxy tunneling and acheive what i want to .
but how ?

Deepak


 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      08-27-2007, 08:08 AM
xask: Deepak Mishra <(E-Mail Removed)> wrote:

> I could force all DNS requests though a TCP connection and then
> preload the proxy tunneling and acheive what i want to .
> but how ?


I am not sure what you are trying to do here. I think you are trying to
resolve internet name addresses. You don't need a DNS server for this. From
what I can gather your 192.168.0.2 machine is able to resolve internet
addresses. Is that correct?

All you need to do on the client machine is configure it to use 192.168.0.2 as
the DNS resolver.

On the 192.168.0.1 client machine, /etc/network/interfaces, add:

dns-nameservers 192.168.0.2

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
Reply With Quote
 
xask: Deepak Mishra
Guest
Posts: n/a

 
      08-27-2007, 10:34 AM
On Aug 27, 4:08 am, markhob...@hotpop.deletethisbit.com (Mark Hobley)
wrote:
> xask: Deepak Mishra <xask.li...@gmail.com> wrote:
>
> > I could force all DNS requests though a TCP connection and then
> > preload the proxy tunneling and acheive what i want to .
> > but how ?

>
> I am not sure what you are trying to do here. I think you are trying to
> resolve internet name addresses. You don't need a DNS server for this. From
> what I can gather your 192.168.0.2 machine is able to resolve internet
> addresses. Is that correct?
>
> All you need to do on the client machine is configure it to use 192.168.0.2 as
> the DNS resolver.


No I told you this machine is not running a DNS server so it wont
resolve any internet name !! thats the whole problem .
I want to tunnel all my DNS requests through a proxy server!

>
> On the 192.168.0.1 client machine, /etc/network/interfaces, add:
>
> dns-nameservers 192.168.0.2
>
> Regards,
>
> Mark.
>
> --
> Mark Hobley
> 393 Quinton Road West
> QUINTON
> Birmingham
> B32 1QE
>
> Email: markhobley at hotpop dot donottypethisbit com
>
> http://markhobley.yi.org/



 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      08-27-2007, 02:47 PM
On Aug 26, 3:20 am, "xask: Deepak Mishra" <xask.li...@gmail.com>
wrote:

> I have a machine on a LAN (192.168.1.x). There is a squid proxy server
> running on the server 192.168.1.2 through which i can access the
> internet.
> Now this machine does not run a DNS server so i can't resolve
> hostnames to dns addresses.
> So I tried different softwares and found - proxychains
> it has an executable 'proxyresolv' which can resolve hostnames
> eg -
> # proxyresolv google.com
> 64.x.x.x ...
>
> where as running
> # resolveip google.com
> fails because i dont have a name server on my LAN !
> so my question is , Is it possible to make all my programs resolve DNS
> names using this executable 'proxyresolv'


Not such that it would be worth the effort need to make it sort of
work. Either run a name server or setup NAT to handle DNS requests.

DS

 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      08-28-2007, 07:08 AM
xask: Deepak Mishra <(E-Mail Removed)> wrote:

> No I told you this machine is not running a DNS server so it wont
> resolve any internet name !! thats the whole problem .
> I want to tunnel all my DNS requests through a proxy server!


Ok. You could make the lookup on the server running squid, and avoid
tunnelling. Add the following line to /etc/network/interfaces (on the squid
machine):

dns-nameservers 123.456.789.012

and then add the squid machine as the nameserver on the client.

I don't see any benefit from tunnelling dns requests, however, if you really
want to tunnel, you will need to configure the resolver to the proxy. I looked
at my resolver, to see if I could find this facility, but it does not appear
to be listed on my version, so you may need to do some research. I did a quick
google, but found nothing that immediately answers your question. However, if
you are using this for http traffic, it appears that the firefox browser can
make use of a remote dns server via a proxy:

in about:config, set network.proxy.socks_remote_dns = true

(I don't know how you tell it which dns server to use though and I don't use
firefox here, so I didn't look at this.)

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS resolving !! Amr Salah Windows Networking 4 04-29-2007 02:08 PM
you get binary newsgroup with ISP but you can buy it too gord1234@yahoo.com Broadband 0 11-05-2005 10:54 PM
you get binary newsgroup with ISP but you can buy it too gord1234@yahoo.com Broadband 0 11-05-2005 10:52 PM
sco binary fping John Martin Linux Networking 3 10-15-2003 10:43 PM
Binary Newsgroups Phaedrus Broadband 9 07-22-2003 06:02 PM



1 2 3 4 5 6 7 8 9 10 11