0

I am connected to a NAS system that it is set to static IP address 192.168.2.41 and the ports 80 and 443 of its static ip are reserved for the NAS configuration webpage.

So if I insert 192.168.2.41:80 or 192.168.2.41 in the browser I will be forwarded to the NAS settings webpage.

I am not allowed to change the NAS webpage address , but on the same NAS there is Pydio webserver running on different port 7126 So if I insert http://192.168.2.41:7126/index.php on web browser it will be transfered to the Pydio login page on the same NAS.

The Pydio comes with a PC application (Pydio-sync(6+)) that can connect to the Pydio server and sync the local files(PC) with Pydio server.

In the Pydio sync application I can not set the port number , and I just can set the Pydio webserver IP address. Since the sync app only looks for http/https standard port numbers (that I guess) so it fails to connect to the pydio server.

I think if it is possible through port forwarding to create a fake static ip address such as 192.168.2.48 and do port forwarding as follows? 192.168.2.41:7126 -----> 192.168.2.48:80

If so what are the iptable rule that should I implement in the Tomato router!?

Thanks

Sina Sou
  • 1
  • 2

1 Answers1

0

Without knowing all the specifics of the tomato router, perhaps something like this might work?

iptables -t nat -A PREROUTING --dst 192.168.2.41 -p tcp --dport 7126 -j DNAT --to-destination 192.168.2.48:80
iptables -A FORWARD -d 192.168.2.48 -p tcp --destination-port 80 -j ACCEPT
iptables -A FORWARD -s 192.168.2.48 -p tcp --source-port 80 -j ACCEPT
Joel Palmius
  • 201
  • 1
  • 5
  • I tried your configuration and it does not work. I mean when i type http://192.168.2.48:80/index.php I get following error in browser This webpage is not available ERR_CONNECTION_TIMED_OUT is there anything wrong with the source and destination address ? – Sina Sou Aug 06 '15 at 09:56
  • Difficult to say exactly what's happening without seeing any logs. It can be one of several things: A routing problem, a DROP rule occuring before the ones mentioned here, the new ip or port being firewalled for other reasons etc. If you have a log for iptables on the router, maybe there's a hint in that? – Joel Palmius Aug 07 '15 at 10:47