2
1
I have the following situation:
I have a wireless access point (192.168.42.1), with 3 hosts (access point and the hosts are running Linux, Debian distro) connected to it:
Host 1: 192.168.42.130
Host 2: 192.168.42.101
Host 3: 192.168.42.58
Is it possible to create a route between any pairs of nodes whose packets exchanged between them necessarily pass through Host 1? For example: if Host 2 and Host 3 exchange packets, the packets, in addition to passing through the access point, must pass through Host 1 as well. If so, how could I do this?
Best regards,
Higo.
You are describing an ad-hoc Wi-Fi network, which connects two Wi-Fi hosts. It will not be the same network as your infrastructure network, where all frames must pass through a WAP. – Ron Maupin – 2016-12-05T03:31:15.813
Thanks for the response, @RonMaupin! I do not think it's an ad hoc wireless network, once I want to keep WAP. In addition to the packets traveling through WAP, my intent is for these packets to travel through another host on the network, in this case Host 1. – HigoFelipe – 2016-12-05T03:45:13.007
OK, you seem to be confusing layer-2 and layer-3. Frames on the same network (LAN) are delivered via layer-2 directly to the destination layer-2 address. Layer-2 doesn't care about layer-3 addresses. You couldn't do this on wired or wireless networks. ARP will give the source host the destination host's MAC address, and the layer-2 frame will be addressed with this as the destination address. The layer-2 bridge (switch or WAP) will deliver the frame directly to the destination host. – Ron Maupin – 2016-12-05T04:06:20.087
Do you need the packets to pass through Host 1 (so it can alter them), or is it enough if Host 1 can see all packets (as if it was on a LAN instead of WLAN)? In the latter case, sometimes you can configure your wireless access point to enable this (because by default on an encrypted WLAN connection, packets go directly between AP and client). In the former case, you must make sure your AP allows the hosts to see each other (verify with
ping
), and then you have to configure Host 1 as forwarding gateway for Host 2 and Host 3, and this is a bit of a headache to set up. – dirkt – 2016-12-06T07:49:22.833@dirkt, I need the packets to pass through Host 1, so they can be captured by a sniffer. – HigoFelipe – 2016-12-20T21:12:23.993