Hi,
I am trying to redirect from a port to a address and port number.
See attached diagram.
The AV3000 system is a FreeBSD 11.1 system with two network interfaces.
igb0 = 192.168.0.18/24
igb1 = 192.168.119.2/24
Gateway of 192.168.0.1
The Mega Pixel is a camera with IP address 192.168.119.201
It has a web page server at port 80
and a default gateway of 192.168.119.1
The ipnat.conf file contains
Each Mega Pixel camera added would have a different IP and use a different port on the igb0 interface.
What I am trying to do is map the port 8301 on the 192.168.0.0/24 interface to port 80 on the Mega Pixel camera.
The HTTP GET from the Viewer does a 3/4 round trip, in other words.
Packet sent from 192.168.0.8 arrives at 192.168.0.18 port 8301 on interface igb0.
Then I see a packet from interface igb1, 192.168.0.119.2 being redirected to 192.168.119.201 port 80.
I also see a packet from 192.168.119.201 port 80 being sent to 192.168.119.2
So I am missing the last part and do not know how to configure ipnat.conf to handle this.
I have tried to several rewrite commands to get the last part of the path to work but no luck.
If I access the Mega Pixel through the RV50 it works fine but I also need the other path to work.
AV3000 info:
rc.conf
I am trying to redirect from a port to a address and port number.
See attached diagram.
The AV3000 system is a FreeBSD 11.1 system with two network interfaces.
igb0 = 192.168.0.18/24
igb1 = 192.168.119.2/24
Gateway of 192.168.0.1
The Mega Pixel is a camera with IP address 192.168.119.201
It has a web page server at port 80
and a default gateway of 192.168.119.1
The ipnat.conf file contains
Code:
rewrite in on igb0 proto tcp from any to any port = 8301 -> src 192.168.119.2/32 dst 192.168.119.201/32,80;
What I am trying to do is map the port 8301 on the 192.168.0.0/24 interface to port 80 on the Mega Pixel camera.
The HTTP GET from the Viewer does a 3/4 round trip, in other words.
Packet sent from 192.168.0.8 arrives at 192.168.0.18 port 8301 on interface igb0.
Then I see a packet from interface igb1, 192.168.0.119.2 being redirected to 192.168.119.201 port 80.
I also see a packet from 192.168.119.201 port 80 being sent to 192.168.119.2
So I am missing the last part and do not know how to configure ipnat.conf to handle this.
I have tried to several rewrite commands to get the last part of the path to work but no luck.
If I access the Mega Pixel through the RV50 it works fine but I also need the other path to work.
AV3000 info:
Code:
FreeBSD amrouter.net 11.1-RELEASE-p9 FreeBSD 11.1-RELEASE-p9 #0: Tue Apr 3 16:59:16 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Code:
ifconfig_igb1="inet 192.168.119.2 netmask 255.255.255.0"
ifconfig_igb0="DHCP"
gateway_enable="YES"
ipnat_enable="YES"
ipnat_rules="/etc/ipnat.conf"