client_ip
should be contained in the fields.yml and should be in the packetbeat index template in ES. It's one of the common fields used in Packetbeat. As an example here is a DNS transaction I captured.
{
"@timestamp": "2018-12-12T05:19:36.591Z",
"bytes_in": 32,
"type": "dns",
"transport": "udp",
"proc": "",
"beat": {
"name": "raspberrypi",
"hostname": "raspberrypi",
"version": "6.5.2"
},
"client_server": "",
"query": "class IN, type A, mesu.apple.com.",
"client_proc": "",
"client_ip": "10.0.0.2",
"port": 53,
"source": {
"hostname": "x.local.mydomain.com"
},
"resource": "mesu.apple.com.",
"bytes_out": 505,
"client_port": 53405,
"ip": "10.0.0.1",
"method": "QUERY",
"host": {
"os": {
"codename": "stretch",
"platform": "raspbian",
"version": "9 (stretch)",
"family": ""
},
"id": "xx",
"name": "raspberrypi",
"containerized": false,
"architecture": "armv7l"
},
"status": "OK",
"responsetime": 42,
"server": "",
"dns": {
"response_code": "NOERROR",
"answers": [
{
"class": "IN",
"ttl": "1163",
"data": "mesu-cdn.apple.com.akadns.net.",
"name": "mesu.apple.com.",
"type": "CNAME"
},
{
"data": "mesu.g.aaplimg.com.",
"name": "mesu-cdn.apple.com.akadns.net.",
"type": "CNAME",
"class": "IN",
"ttl": "1844"
},
{
"data": "17.253.15.207",
"name": "mesu.g.aaplimg.com.",
"type": "A",
"class": "IN",
"ttl": "14"
},
{
"name": "mesu.g.aaplimg.com.",
"type": "A",
"class": "IN",
"ttl": "14",
"data": "17.253.97.202"
}
],
"authorities_count": 13,
"flags": {
"checking_disabled": false,
"authoritative": false,
"truncated_response": false,
"recursion_desired": true,
"recursion_available": true,
"authentic_data": false
},
"question": {
"etld_plus_one": "apple.com.",
"name": "mesu.apple.com.",
"type": "A",
"class": "IN"
},
"additionals_count": 7,
"id": 13550,
"op_code": "QUERY",
"answers_count": 4,
"authorities": [
{
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "i.gtld-servers.net.",
"name": "com."
},
{
"class": "IN",
"ttl": "33982",
"data": "m.gtld-servers.net.",
"name": "com.",
"type": "NS"
},
{
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "d.gtld-servers.net."
},
{
"class": "IN",
"ttl": "33982",
"data": "b.gtld-servers.net.",
"name": "com.",
"type": "NS"
},
{
"data": "f.gtld-servers.net.",
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982"
},
{
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "e.gtld-servers.net."
},
{
"data": "j.gtld-servers.net.",
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982"
},
{
"ttl": "33982",
"data": "g.gtld-servers.net.",
"name": "com.",
"type": "NS",
"class": "IN"
},
{
"data": "a.gtld-servers.net.",
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982"
},
{
"class": "IN",
"ttl": "33982",
"data": "l.gtld-servers.net.",
"name": "com.",
"type": "NS"
},
{
"name": "com.",
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "k.gtld-servers.net."
},
{
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "h.gtld-servers.net.",
"name": "com."
},
{
"type": "NS",
"class": "IN",
"ttl": "33982",
"data": "c.gtld-servers.net.",
"name": "com."
}
]
},
"destination": {
"hostname": "dns.local.mydomain.com"
}
}