0

Just wondering how I would accomplish the following IPtables rules under Mac OSX:

iptables -A PREROUTING -t mangle -p udp --sport 7078 -J TOS --set-tos Maximize-Reliability
iptables -A PREROUTING -t mangle -p udp --sport 7078 -J TOS --set-tos Maximize-Throughput
iptables -A PREROUTING -t mangle -p udp --sport 7078 -J TOS --set-tos Mimimize-Delay

Also, with the source-port (sport), is that freely interchangeable with the destination port (dport)?

Many Thanks in advance.

Tobias

2 Answers 2

2

You want the 'ipfw' command.

2
  • 1
    ipfw is now deprecated and replaced with pfctl, but otherwise correct.
    – Jenny D
    Feb 20, 2013 at 15:00
  • well, it seems none of them have ability to update TOS byte
    – gelraen
    Feb 20, 2013 at 15:09
0

This is what I have to redirect some UDP traffic to external IP addresses. Running Mac OSX 10.9 (Mavericks) with PF. ipfw was deprecated. But anyway, PF is running on the old syntax pre 4.7 I guess. You might want to tweak ips and interfaces.

ext_if="en0" 
int_if="bridge100"
old_ip="1.2.3.4"
new_ip="5.6.7.8"
rdr pass on {$ext_if, $int_if} inet proto udp from any to $old_ip -> $new_ip 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .