Ji Dong
09/17/2009 5:03 AM
post38135
|
I am trying to config the Packet filter to redirect all the UDP packet come to the perticular IP address spcesfied port
ot another IP address another port.
For example, I want :
all the UDP packet to en0 IP address 192.168.1.1 port 60000
redirect to
IP address 192.168.3.255 port 50000
(basically change a unicast to broad cast)
what I have done is:
1. first "mount -Ttcpip lsm-pf-v4.so"
2. edit /etc/pf.conf to:
ext_if="en0"
rdr pass on $ext_if inet proto udp from any to 192.168.1.1 port 60000 -> 169.254.3.255 port 50000
3. when I run: "pfctl -f /etc/pf.conf -vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"
it feed back as:
No ALTQ support in kernel
ALTQ related functions disabled
Loaded 345 passive OS fingerprints
ext_if = "tsec0"
@0 rdr pass on en0 inet proto udp from any to 192.168.1.1 port = 60000 -> 169.254.3.255 port 50000
After that
I start wireshark & another software purely send out UDP packet
after I send a udp message to 192.168.1.1 port 60000, the wirehark captrue that ICMP the destination port is unreachable
.
am I missing anything? I think this should be straight away:(
|
|
|