Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

You want the 'ipfw' command.

share|improve this answer
    
ipfw is now deprecated and replaced with pfctl, but otherwise correct. –  Jenny D Feb 20 '13 at 15:00
    
well, it seems none of them have ability to update TOS byte –  gelraen Feb 20 '13 at 15:09

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 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.