ColinTaylor
Part of the Furniture
Yes, no problem. But I've not tried using it from a startup script, only by typing them into the command line.
Yes, no problem. But I've not tried using it from a startup script, only by typing them into the command line.
I don't know what you mean by "AP (different network)". I'm guessing it has a second NIC on a different subnet? I can't think that would be a problem unless you've got some messed up routing between subnets. Other than that the Linux box is nothing unusual..115 is a linux box running an AP (different network), weewx (doesn't use 80 or 443), mosquitto (different ports), and Apache of course on 80 & 443.
I assume you're talking about port forwarding in the router's GUI. That shouldn't be a problem. Unless of course there's a bug in the firmware.My router sends port 80 & 443, among others, to .115 both IPV4 and IPV6. I did those from the router's GUI.
I wonder if it is not happy with taking the port 80 traffic from the weather station and sending it to .115
pcap_filter = src 10.10.100.121 and dst port 80
iptables -t mangle -A PREROUTING -s 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115
iptables -t mangle -A POSTROUTING -d 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115
OK. Those commands look correct then.Code:iptables -t mangle -A PREROUTING -s 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115 iptables -t mangle -A POSTROUTING -d 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115
Those are the iptable commands I use.
I don't wish to have the port 80 traffic pass only to the .115 address, it should proceed to its destination while being mirrored to .115
Are you saying that 10.10.100.115 and 10.10.100.121 are two network interfaces on the same physical box, i.e. multihomed? That could cause you problems if you haven't set the kernel networking parameters correctly.What I meant by the AP on a different network is that I have a USB WiFi adapter serving as an access point to provide a separate network for the weather station as I was never able to get the router to do the mirroring.
So, the address of the device I want to sniff is .121 the device doing the sniffing is .115
That is what gets the data into weewx.Code:pcap_filter = src 10.10.100.121 and dst port 80
OK. Those commands look correct then.
Are you saying that 10.10.100.115 and 10.10.100.121 are two network interfaces on the same physical box, i.e. multihomed? That could cause you problems if you haven't set the kernel networking parameters correctly.
So how is it configured now?No. That's how I wish it to work.
Currently it is configured differently as the router refuses to mirror the traffic.
So how is it configured now?
Linux has 10.10.100.115 and uses hostapd to provide an AP for the weather station.
AP has 10.10.0.1
dnsmasq provides DHCP for the AP which allows the weather station to be assigned a static IP so I can sniff the traffic.
Then enable ipv4 forwarding.
iptables and iptables-persistent to allow the traffic from the AP to the LAN that is controlled by the router.
If the router mirrored traffic it would be the weather stationSo where (and what) is 10.10.100.121 in this setup?
So try this command and see if it accepts it:
admin@RT-AC86U-6828:/tmp/home/root# iptables -t mangle -A PREROUTING -s 10.10.10
0.121 -j TEE --gateway 10.10.100.100
iptables: No chain/target/match by that name.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!