Wireshark display filter: host to host - wireshark

I need to Write a Wireshark display filter to meet the following requirements.
All traffic from host 192.168.12.44 to host 192.168.12.1
I believe it is just
ip.src_host = 192.168.12.44 && ip.dst_host 192.168.12.1
or
ip.src== 192.168.12.44 && ip.dst==192.168.12.1
I'm just not sure which syntax is correct. Can anyone offer any tips/advice? I tried this on two different IPs that i can actually test yet they seem to offer different results, so I'm not sure which one I need.

ip.src & ip.dst are for IP adresses while ip.src_host & ip.dst_host are for their DNS names. Suppose an IP with the address 192.168.1.1 has a corresponding DNS name of mydns.mysite.com. Assuming you have enabled Resolve Network Address under View --> Name Resolution, then ip.src_host will filter mydns.mysite.com while when not enabled ip.src will filter 192.168.1.1
Please refer to this link for more information.

Related

Change multiples IP and MAC with tcprewrite

I'm working with tcpreplay and I have a question. Let's say I have three hosts on the same network, for example 172.16.25.0/24. While these hosts exchange messages with each other, I capture the data on the interface of one of them through tcpdump, generating a .pcap file. How do I change the IP and MAC addresses of the three hosts using tcprewrite?
Following the changes I want to achieve:
172.16.25.151 (00:00:00:00:00:a1) -> 10.10.10.151 (00:00:00:00:00:51)
172.16.25.152 (00:00:00:00:00:b1) -> 10.10.10.152 (00:00:00:00:00:52)
172.16.25.153 (00:00:00:00:00:c1) -> 10.10.10.153 (00:00:00:00:00:53)
For the cache file:
tcpprep --auto=bridge --pcap=ping.pcap --cachefile=case1.cache
My problem is when I try rewrite the endpoints MAC address.
I used:
tcprewrite --endpoints=172.16.25.151:172.16.25.152 --enet-smac=00:00:00:00:00:a1,00:00:00:00:00:51 --enet-dmac=00:00:00:00:00:b1,00:00:00:00:00:52 -i ping.pcap -o ping.pcap-rw-mac.pcap --cachefile=case1.cache
And this replace all flows with 00:00:00:00:00:51,172.16.25.151->00:00:00:00:00:52,172.16.25.152, inclusive those with the host_153.
What am I doing wrong?

Can't switch from staic IP to DHCP in nodemcu lua

wifi.sta.setip({ ip = "192.168.0.111", netmask = "255.255.255.0",gateway = "192.168.0.1"})
with above we can set static IP,
but by mistake if someone enters the netmask/gateway/ip a digit or to wrong (eg:netmask = "255.255.2.0" ) we have no way of detecting. only way is to
by re entering correctly
rebooting
(How to clear static IP configuration and start DHCP)
so it would be nice if we can detect the status somehow like with wifi.sta.status() do.
How to clear static IP configuration and start DHCP
wifi.sta.clearconfig()
Clears the currently saved WiFi station configuration, erasing it from
the flash. May be useful for certain factory-reset scenarios
Not sure if this also deletes the ip but you can probably just set the ip to "0.0.0.0" befor you reconnect.

Change default freeradius auth and acct port in CoovaChilli

So I have two freeradius / radiusdesk installations on the server.
First one is old one and uses default freeradius ports: 1812/1813 for Auth/Acct.
The second one is the new once and using ports: 10001/10002 for Auth/Acct.
The issue now is that on my router, CoovaChili is always connection to the first one ( old one ) and communicating on the ports 1812/1813. I want to change it's ports. But it doesn't seems to be working. The OS is OpenWrt.
In my /etc/config/chilli i have added the following lines:
option radiusauthport 10001
option radiusacctport 10002
But is is not working. CoovaChilli still sends request to the old 1812/1813 ports. I want to know how to change that so it communicates with my defined port numbers, rather than the default ones.
Looking for the configurations to fix it.
Thanks
Looking at the OpernWRT guide at https://openwrt.org/docs/guide-user/services/captive-portal/wireless.hotspot.coova-chilli, it seems that you need to put the value parameter inside double quotes.
Specifically
option radiusauthport "10001"
option radiusacctport "10002

Two Lslidar(Leishen) connected with One Embedded Board(Jetson Xavier)`s possible?

Running one of the Lslidar(16 Channels) on the Embeded board(ROS development environments) is not a problem.
This is because you can use the default IP and ports.
But I plan to run two at the same time, and I want to use values other than the default values of ports and IP..
For example, you can use ports like 2368 and 2369.
I need a reference to refer to how to change the port value and IP value...
Help Plz...
Here is code from lsLidar driver from ROS Wiki:
bool LslidarC16Driver::loadParameters() {
//pnh.param("frame_id", frame_id, std::string("lslidar"));
pnh.param("lidar_ip", lidar_ip_string, std::string("192.168.1.222"));
pnh.param<int>("device_port", UDP_PORT_NUMBER,2368);
pnh.param<bool>("add_multicast", add_multicast, false);
pnh.param("group_ip", group_ip_string, std::string("234.2.3.2"));
inet_aton(lidar_ip_string.c_str(), &lidar_ip);
ROS_INFO_STREAM("Opening UDP socket: address " << lidar_ip_string);
if(add_multicast) ROS_INFO_STREAM("Opening UDP socket: group_address " << group_ip_string);
ROS_INFO_STREAM("Opening UDP socket: port " << UDP_PORT_NUMBER);
return true;
}
As you can see there is a place where you can change port and IP. For two devices I'd advise you to modify the original driver. All source code is available on https://github.com/tongsky723/lslidar_C16
Clone it to you workspace and create additional functionality for two LiDARs.

Get ip address of interface eth0

How can i find out the ip address of eth0 with lua?
My attempt does look like this:
system = require "system"
ip = system._execute("ifconfig eth0 | grep -i 'inet addr:'")
print (ip)
But is there a better way?
"better way" may be subjective, but I guess I'd (personally) prefer to io.popen("ifconfig etho") and process the text coming back from that like a text file, instead of relying on grep.

Resources