I have three VMs
I can open the website via http://192.168.0.12 because I have added a static route on the first VM, I route the 192.168.1.0 segment back to 192.168.0.100, that means all these three VMs are working properly.
But after I changed the firewall rule. the situation became unclear to me. Now the firewall rule become below:
But the testing and the result is not reasonable for me.
Conclusion:
The port in the firewall rule is not working. and I don't understand why it will automatically choose 80. when I am trying to open http://1.1.1.1:123.
- using IP 192.168.0.12 and running a web server on port 80
- using FreeBSD as a gateway (WAN IP is 192.168.0.100, LAN IP is 192.168.1.1)
- also running a simple website which is listening port 80 and port 8080, using IP 192.168.1.100.
I can open the website via http://192.168.0.12 because I have added a static route on the first VM, I route the 192.168.1.0 segment back to 192.168.0.100, that means all these three VMs are working properly.
But after I changed the firewall rule. the situation became unclear to me. Now the firewall rule become below:
Code:
00001 fwd 127.0.0.1,8080 tcp from any to any in
65535 allow ip from any to any
But the testing and the result is not reasonable for me.
- Test 1, Try to open http://1.1.1.1, it will open port 80 of the gateway.
- Test 2, Try to open http://1.1.1.1:80, it will open port 80 of the gateway.
- Test 3, Try to open http://1.1.1.1:8080, it will open port 8080 of the gateway.
- Test 4, Try to open http://1.1.1.1:123, it will open port 80 of the gateway again!.
Conclusion:
The port in the firewall rule is not working. and I don't understand why it will automatically choose 80. when I am trying to open http://1.1.1.1:123.