Is there any way for IP Spoofing in jmeter.i have tried it by "CSV data set config".Is there any other way..please let me know.Thanks in advance.
3 Answers
Following steps will help you implement the IP Spoofing:
- Request for 6 static IP address (it depends on your requirement) from your IT team.
- Go to IPv4 properties, add the primary IP, Subnet mask, Gateway, DNS etc.
- Click on advanced button, in IP Address section add all the remaining IP address.
- Save all the 6 IP address in a CSV file
- Now open Jmeter, add a CSV data set config (at the top below Test Plan)and configure IP address CSV file in it
- Click on your HTTP samplers 1 by 1 and change the below mentioned value as per your CSV Data Set Config
Note: Spoofing will not work using Wifi. The Jmeter machine must be connected to LAN to achieve IP Spoofing.
Update---------------------------------
http://www.filedropper.com/ipchangersetconfig
http://www.filedropper.com/ipaddresslist
Hope this will help.

- 1,693
- 1
- 13
- 14
-
yeah..i have just created a txt file with 5 ipaddress which are added to my subnet where jmeter is installed.and i configured as u mentioned,But the request is coming from the main ip address only. – sravan Dec 23 '14 at 05:48
-
It has to be a CSV file and also how may users/threads are you using? – Zubair M Hamdani Dec 23 '14 at 05:53
-
with CSV file also it is not working.i have set 5users for sample run – sravan Dec 23 '14 at 06:34
-
I believe you are missing something in the configuration, This has been implemented in the same way in my machine and our Test Lab. – Zubair M Hamdani Dec 23 '14 at 06:39
-
can you please send us a link or screenshots for this scenario.I am unable to attach screenshots from my side.thanks in advance. – sravan Dec 23 '14 at 06:47
-
I will try to share the script or screenshot. Are you able to ping all the 5 IP address? also do you see any failures or does the script always picks the primary IP? and how do you verify which IP address is getting used? – Zubair M Hamdani Dec 23 '14 at 07:12
-
thanks a lot..its working.and im new to jmeter,i need some stuff on jmeter.where can i get it?? – sravan Dec 23 '14 at 08:04
-
If you put the the CSV controller like PerfTest explained, each address is used by each thread (which is quite correct, but maybe it is not what you expected). If you loop just once, the you will have the same address – sbos61 Dec 27 '14 at 21:37
-
@sbos61: It works exactly as per the real world scenario, 1 user will always have 1 IP address. – Zubair M Hamdani Dec 29 '14 at 06:26
-
Here was an English language tutorial. – pcapademic Dec 28 '15 at 22:17
-
Here was an English language tutorial: https://blazemeter.com/blog/using-ip-spoofing-simulate-requests-different-ip-addresses-jmeter Some hints: (1.) the "HTTP Request -> Implementation" must be set to "HttpClient.." (2.) The "CSV" file is just a txt file, 1 IP address per line, with extention (for Windows) of .CSV (yes, I know, basic. But you don't need excel, just notepad) (3.) For `${IP_address}` to work in the HTTP Request Sampler, the Config Element CSV Data Set Config "Variable Names" field must be configured at `IP_address` – pcapademic Dec 28 '15 at 22:25
Yes, you can send request using multiple Ip addresses to your application something like real world scenario.
Please check following :
You will have to use HTTPClient implementations.
Please check : Helpful tutorial

- 5,292
- 9
- 60
- 127
First we need to create the virtual IP Enter the command in Terminal
ifconfig
go to root folder by:- sudo su
suppose you want a series of 10.0.0.1~10.0.0.255 then run the blow command :-
for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done
Print your IPs:- for each in $(seq 1 254); do cat 10.0.0.$each > ip.txt; done
for each in $(seq 1 254); do echo "10.0.0.$each"; done > ip.txt
After generating the reports run this command :- for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done
do :- ifconfig and check that IPs are assigned to every eth port Now open your Jmeter create a thread user add CSV Data Set Config, Add HTTP Request Sampler, Add Listner according to you enter image description here give the path of saved csv file which is containg your virtual IPs and your Variable name like this in below imageenter image description here
Now give your IP or host address of your software, give the port number, give the API address which you want to test and body of your POST data if any
Now give your variable name in advance tab like this ${Variable_name_given_in_CSV Config Element} and Click on Run button it will hit you API with multiple virtual IPs [enter image description here][3]