2

I am using python I want to spoof srcip address when sending DNS query?

Python code is not neccessary? Even shell command do the purpose.

I tried dig but error comes. eg

$dig -b 10.0.1.1 google.com
dig: isc_socket_bind: address not available

can anyone know how to do it ?

Thanks.

duck
  • 2,483
  • 1
  • 24
  • 34

1 Answers1

3

man dig says

 -b address
     Set the source IP address of the query to address.  This
     must  be  a  valid  address on one of the host's network
     interfaces or 0.0.0.0 or ::. An  optional  port  may  be
     specified by appending: #<port>

so 10.0.0.1 (or whatever spoofed address you are using) should be a valid network ip in your local network.

pranshus
  • 187
  • 6
  • Thanks i got it, Is their is any way i can spoof the src addredd via shell command or some code – duck Dec 12 '12 at 06:24