Home › Forums › OS X Server and Client Discussion › Questions and Answers › Getting NAT and portwarding to work in 10.4 Server
- This topic has 1 reply, 2 voices, and was last updated 18 years, 7 months ago by stevek.
-
AuthorPosts
-
July 16, 2005 at 3:11 pm #362339rfnParticipant
Hi!
I’m currently using my 10.4 server as a gateway and it works fine for that. Unfortunately I can’t get the portforwarding to works as I want it to.
I can get ONE rule to work, but not more, which makes me believe that I’m doing something wrong in natd.plist. This is my natd.plist:
<plist version="1.0">
<dict>
<key>clamp_mss</key>
<true/>
<key>deny_incoming</key>
<false/>
<key>dynamic</key>
<true/>
<key>interface</key>
<string>en1</string>
<key>log</key>
<true/>
<key>log_denied</key>
<false/>
<key>proxy_only</key>
<false/>
<key>reverse</key>
<false/>
<key>same_ports</key>
<true/>
<key>unregistered_only</key>
<true/>
<key>use_sockets</key>
<true/>
<key>redirect_port</key>
<array>
<dict>
<key>proto</key>
<string>tcp</string>
<key>targetIP</key>
<string>10.0.0.99</string>
<key>targetPortRange</key>
<string>6881-6889</string>
<key>aliasIP</key>
<string>[my external IP]</string>
<key>aliasPortRange</key>
<string>6881-6889</string>
</dict>
</array>
<key>redirect_port</key>
<array>
<dict>
<key>proto</key>
<string>tcp</string>
<key>targetIP</key>
<string>10.0.0.99</string>
<key>targetPortRange</key>
<string>5900</string>
<key>aliasIP</key>
<string>[my external IP]</string>
<key>aliasPortRange</key>
<string>5900</string>
</dict>
</array>
</dict>
</plist>When I stop and start NAT it only makes a rule for port 5900, and not 6881-6889. If I delete the last <key>redirect_port…. then I get a rule for 6881-6889. What am I doing wrong?
This is the natd.conf.apple for the above natd.plist:
# This file is reserved for configuration automatically generated by the Server Admin app.
# Generated: 2005-07-14 10:49:43 +0200.
#
interface en1
dynamic yes
log yes
log_denied no
deny_incoming no
use_sockets yes
same_ports yes
unregistered_only yes
reverse no
proxy_only no
clamp_mss yes
redirect_port tcp 10.0.0.99:5900 [my external IP]:5900I have looked at Apple’s documentation and at http://www.labo-apple.com/en/articles/os+x+server/s+x+server-277/ but nothing helps.
July 28, 2005 at 3:08 am #362549stevekParticipantyour issue is an .plst/XML issue..
[QUOTE BY= rfn]<key>redirect_port</key> <array> <dict> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>10.0.0.99</string> <key>targetPortRange</key> <string>6881-6889</string> <key>aliasIP</key> <string>[my external IP]</string> <key>aliasPortRange</key> <string>6881-6889</string> </dict> </array> <key>redirect_port</key> <array> <dict> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>10.0.0.99</string> <key>targetPortRange</key> <string>5900</string> <key>aliasIP</key> <string>[my external IP]</string> <key>aliasPortRange</key> <string>5900</string> </dict> </array>
[/QUOTE]
what your problem is is having 2
<key>redirect_port</key> <array> ... </array>
tags.
what you need to do is under the first redirect_port key create another
array so what you should have is<key>redirect_port</key> <array> <dict> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>10.0.0.99</string> <key>targetPortRange</key> <string>6881-6889</string> <key>aliasIP</key> <string>[my external IP]</string> <key>aliasPortRange</key> <string>6881-6889</string> </dict> </array> <array> <dict> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>10.0.0.99</string> <key>targetPortRange</key> <string>5900</string> <key>aliasIP</key> <string>[my external IP]</string> <key>aliasPortRange</key> <string>5900</string> </dict> </array>
this should work.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed