Modifiy DNS packet source IP

Discussion in 'Server Operation' started by raws99, Jan 26, 2014.

  1. raws99

    raws99 New Member

    Hello! Finally I signed up, since the howtos here helped me alot!

    I want to "edit" the source ip of my outgoing dns traffic(packets):
    Client (IP:1.1.1.1) -> My DNS Server (10.10.10.10) -> External DNS Server (8.8.8.8)

    DNS Packet (source ip 1.1.1.1) -> My Server (magic happens) -> External DNS (source ip 10.10.10.10)

    So the client requests a domain from my dns server, here I want to forward the request to an external server, which checks the source ip of the request to give access.

    So I need to manipulate the DNS Packet to have the DNS Servers IP (10.10.10.10) as Source IP...

    I found the following:
    http://www.blissend.com/node/7

    I have bind running, which will forward the requests to the other dns server, now I only need to edit the outgoing traffic on udp/tcp 53 to have the source ip of the server, right?

    How can i realize this with iptables?

    Thank in advance!
     
  2. raws99

    raws99 New Member

    Hi

    Just a quick answer: It's not possible on my virtual server (using openvz)

    So I thought I'm unable to follow some instructions, in fact it's not supported.. :)

    So the above howto is a good one for anyone having the same question!

    //close
     

Share This Page