I try to use xtables TEE for packet mirroring to another port of
localhost but failed -- no error in the command but no packets
received in the mirrored port.
Original Packet:
Destination: 192.168.0.1
Destination Port: 514
I want to create a mirror packet with destination port 516.
Attempt 1 (Modified from well known example of TEE):
iptables -A PREROUTING -t mangle -p udp -d 192.168.0.1/32 --dport 514
-j TEE --gateway 127.0.0.1
iptables -A PREROUTING -t nat -p udp -d 192.168.0.1/32 --dport 514 -j
DNAT --to 127.0.0.1:516
Attempt 2 (Use an alias interface to (try to) avoid special handling
for loopback interface, if any):
ifconfig eth0:0 192.168.0.2 netmask 255.255.255.255 up
iptables -A PREROUTING -t mangle -i eth0 -p udp -d 192.168.0.1/32
--dport 514 -j TEE --gateway 192.168.0.2
iptables -A PREROUTING -t nat -i eth0:0 -p udp -d 192.168.0.1/32
--dport 514 -j DNAT --to 192.168.0.2:516
Please advice, thanks!
Alan
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Netfilter Development]
[Linux Kernel Networking Development]
[Linux Networking Development]
[Linux Kernel Development]
[Linux Resources]
[LARTC]
[Bugtraq]
[Consulting]
[Free Internet Dating]
[Yosemite Forum]
[Photo]