/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! 
/* ALSO: Don't quote this header. It makes you look lame :-) */



Dear all:
               this is my situation,there are serval hosts with private IP
connected to the Linux box and the Linux box connected to internet (ISP)
through(PPPoE, ADSL, Cablemodems...),it looks like:
                                                           ---------
_____
                               |   ISP  | <===> | DNS | (61.218.111.1:53)
                                    ---------               --------
                                                                |
(61.218.111.49)
                                                                |
                                                    -------------------
(61.218.111.50)
                                                    |Linux (2.4.19)|
                             ------------------- (10.0.0.1)
                                                     /      |      |       \
                                                 H1     H2  ....    Hn
                    (10.0.0.2) (10.0.0.3) (10.0.0.x)

i want the Linux box work as a DNS relay server, that is, any host send a DNS
request to Linux, it will forward the request to the ISP's DNS server. So I
think NAT can do this,for example:
1.H1 send a DNS request to Linux box(s:10.0.0.2/d:10.0.0.1)
2.Linux box translate the packet and forward it to ISP's DNS
server(s:61.218.111.50/d:61.218.111.1)
3.Then the reply coming back (s:61.218.111.1/d:61.218.111.50)
4.here is the problem...Linux box must de-SNAT for the packet to the original
host(s:10.0.0.1/d:?????)
   In detail:
          $IPTABLES -A PREROUTING -t nat -p tcp -d 61.218.111.50 --dport 53 \
          -j DNAT --to ?????:53

  (How can i assign the hostIP? Because there is no info for me to know the
original host who sends the request!!
  Does NAT Server will de-SNAT for me in kernel(many docs say this, but i don't
know how it did? Should I still
  assign the hostIP manually. ) And if nat can't work, is there any solution for
DNS relay?)

Any Comment, Appreciate!!
best rgs.


_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- 
THIS INCLUDES UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to