I'm trying to forward requests from one port to another and running into problems.
I have a Mac Server (10.5) and a number of Mac clients. I want requests going to one of my clients for port 80 (192.168.1.20:80), to go instead to port 10080 (192.168.1.20:10080).
I've tried everything I can but I can't seem to get this to work. Here's what I've done:
I've added this to my ipfw.conf file:
add 100 fwd 192.168.1.20,80 ip from any to 192.168.1.20 dst-port 10080
But that didn't seem to work.
I also tried to add the correct info the my natd.conf.apple file.
natd.conf.apple:
interface en0
natportmap_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 192.168.1.20:80 192.168.1.20:10080
I stop and restart both NAT and Firewall from the Server Admin.
Only other thing I can figure is that I've got two NIC's in the server (en1 & en0) en1 is where all the clients are and the 192.168.1.xxx IP addresses. But en0 is the direct connection to the internet. So is it possible that my port forwarding is working, but on the wrong interface?
Is there something I'm doing wrong here?
Any help would be greatly appreciated. Thanks in advance.
I have a Mac Server (10.5) and a number of Mac clients. I want requests going to one of my clients for port 80 (192.168.1.20:80), to go instead to port 10080 (192.168.1.20:10080).
I've tried everything I can but I can't seem to get this to work. Here's what I've done:
I've added this to my ipfw.conf file:
add 100 fwd 192.168.1.20,80 ip from any to 192.168.1.20 dst-port 10080
But that didn't seem to work.
I also tried to add the correct info the my natd.conf.apple file.
natd.conf.apple:
interface en0
natportmap_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 192.168.1.20:80 192.168.1.20:10080
I stop and restart both NAT and Firewall from the Server Admin.
Only other thing I can figure is that I've got two NIC's in the server (en1 & en0) en1 is where all the clients are and the 192.168.1.xxx IP addresses. But en0 is the direct connection to the internet. So is it possible that my port forwarding is working, but on the wrong interface?
Is there something I'm doing wrong here?
Any help would be greatly appreciated. Thanks in advance.
Last edited: