ERPNext Conference 2019* Blog

ERPNext access by wan problem


thanks for helping in advance .
i can access my erpnext production website by lan by entering the ip address of the ubuntu pc which has the erpnext installation .
i want to access it by wan . i asked my ISP for static ip and i got it . but when i open the static ip it opens the router page .
how i configure port forwarding for the erpnext website ?

there is a topic but no one could help me !

ERPNext access by wan issue!

you will need to configure Port Forwarding on your router to route requests to port 80 to the said port on your Ubuntu PC.


Thank you
I changed the erpnext port to 8080 and i can now acces it by
I changed the port forwarding settings like this pic . Pls check


Looks right to me, but you should leave the Start Port and End Port the same (i.e. 8080 for both the WAN Start/End Ports and the LAN Start/End Ports).


I already tried that . Now i changed the erpnext port again and i made it 70 .
And change the router settings like this .
Still opening the router page when i access the static ip !


do you have any explanation ??


Just to be sure, you are using static.ip.of.wan:70 ?


No, i am just accessing my static ip ! Without typing the port number


Try it with the port 70, it appears in your configuration that you are forwarding port 70 on the WAN to port 70 on the lan address and port, or whatever port EERPNext is running on.

If your router has a web interhace on port 80, then don’t try forwarding that . 8080 WAN to same on the ip of the ERPNExt If you change the port that the webserver is listening on in the configuration, restart the service for it to take effect.


i tried adding the port number to my ip . it is not opening any thing !
idk why it’s not working ! do you have any other idea ?


Can you confirm the LAN ip and port that ERPNext is on? Can you access from another computer on the LAN?

What is the make and model of the router?


Thanks smino for replying .
I can access the erpnext website from lan yes with port 70 .
By writing
My router type zte h108n .


Using this as a guide, at step 6 put in 70 at all places. Double check that you ERPNext computer has the IP address in 7. Be sure to check Enable and Add. You can try Shields Up to scan the router to make sure port 70 is open.


i did follow all steps and checked for the port 70 with Shields up and it’s open .
but still getting the router page !
do you advice me to change this router ? or that is not the issue ?
thank you


If you have a spare router , changing it might be worthwhile. Or ressetting the router to factory and trying the port forward again. it sound like the http server is listening on all ports and redirecting to the router web page, which is not a great thing from a security standpoint. By default , there should be no web access to the router configuration from the WAN side. You haven’t made any changes to /etc/hosts on the ERPNext computer?


I tried a apare router but still there is no effect .
I reinstalled ubuntu and erpnext from the begining to avoid any changes in etc/hosts
I think i will give up . Is there any other way to access the erpnext from wan ?


What is the make/model of the spare router?
What is the ip address of the ubuntu computer ?
What do you use as ip address and port on a different computer on the LAN to access ERPNext in a web browser?

The ERPNext is running natively in Ubuntu or in a VM?


Spare router is same the previous router model zte h108n
The ip address of the erpnext website (i can access with this from any lan device)
Erpnext is running on ubuntu


Try running a web server, or some other service on a different pc and see if you can port forward to that through the router.


Sometimes, it may happen that although you’ve enabled port forwarding on your router, your ISP may not allow it. Contact your ISP to ensure that is not the case. They may also help you set this up.