I had a spare local pc at my office that had ubuntu 20.04 installed on it. I decided to use it as a dedicated server to host the ERP Next Software. So, I installed open ssh server and accessing this pc from another system, i managed to install ERP next.
I purchased a custom domain on godaddy website for this purpouse and a static IP address from my ISP.
I have added the static IP as an ‘A’ record to my domain and provided a ‘CNAME’ erp pointing to the ‘A’ record.
I can access this domain from any system on the same network. However, i cannot connect to it from a different network(e.g. another wireless network/mobile network).
I would like to access this server from anywhere, i.e., i want to expose this ERPnext server over the internet. Is there any way i can do that?
Any help is appreciated. Thanks in advance
You need to figure out the port-forwarding settings for your router.
Make sure your server gets same ip via DHCP from router or make it static IP from router. There are settings for this available and differ from device to device.
In the port-forwarding settings forward the 80 and 443 ports from the server (identified by static ip/reserved ip/mac address)
Make sure your ubuntu os is not blocking port 80 and 443 by firewall.
Ok. I have set a private static ip for the pc and enabled port forwarding for that on the router. I have even reserved the static ip i have set on the router by binding the mac address of my server to the ip address(the private static and not public static)
My ISP set up the pulic static IP as a secondary connection(WAN) on my router.
I am unable to set port forwarding for the public ip address from my end.
Should i ask my ISP to do it?
In addition, i have enabled DMZ and port triggering to open ports 80 and 443 on my router
I have already opened ports 80 and 443 on my server at the time of installing ERP Next.
What more should i do?
port forwarding is available on common routers
check if you find it here Port Forwarding Archives | Support | No-IP Knowledge Base or search in general for “port forwarding router-brand-model”
I know about port forwarding. I have enabled port forwarding for my reserved(static) private ip i set when installing ERP Next. I have a few doubts though.
1.My ISP has configured a static public ip as a secondary connection on my router but i have no way of binding that to my server. Did my ISP configure it incorrectly or am i doing something wrong here? I’m new to linux and ERP’s in general but this is a good learning experience
2. If i understand correctly, I must open ports 80 and/or 443 on my server and forward them in my router by giving my static ip address. The problem here is, i cannot give my static public ip as it is not accepting it for port forwarding.
Ex. I set my server static ip to 192.168.0.2xx. My ISP has configured a secondary connection with a static public ip of 103.xx.xxx.xx with subnet mask 255.255.255.0 which is the same subnet mask as my LAN/Internet gateway.
I have set port forwarding to ports 80 and 443 on my router to the ip address 192.168.0.2xx.
My domain has an ‘A’ record pointing to the static public ip 103.xx.xxx.xx.
I’m able to access the domain, the public static address and private ip address through my web browser on the same network i’ve installed erp next at but not over any other network or the internet
What am i doing wrong? or what more do i do?
There is sometimes a problem with secondary connections as in my experience connecting a virtual interface to a hardware one is difficult.
I would get a second inexpensive router and direct line. Alternatively use your initial public IP and put the server in the router DMZ.
That is what I am doing except I dont have a static IP so I have to use dynamic DNS.
Yeah I know… i was using a no ip connection earlier but that was also not displaying the domain over another network. That is why i went for a static public ip.
So what you are essentially saying is that i have to get another router and have my isp onfigure that with a static public ip and connect my server to that router?
Yes…or my DMZ method
Here is my 2 cents.
Let assume ERPnext Server IP as 192.168.0.200 and Your router IP is 126.96.36.199 .
Open port 80 / 443 in your ERP Server firewall (assuming UFW) … which you have said is done.
Now on your Router you need to do Port Mapping. Map your TCP 80 of the Router IP (192.168.0.1) to the Server TCP 80 (192.168.0.200) … the same goes for 443. I presume this is done.
Domain name records mapped to your Static Public IP in your Domain Name at Go Daddy. Also done.
Now the part where it gets tricky is that your ISP has given the Public Static IP to your WAN2 (secondary WAN) as you have mentioned. Your router by default will be using WAN1 … here you need to have a masq rule or Multipath rule for forwarding your traffic to WAN2
What kind of connection and router do you have ??
I’m sorry for not replying back for so long. It turned out that my ISP had not assigned a static address at the time of installation on the server. I got it sorted with my ISP and the website is up and running now.
Thanks for the reply and sorry for the late reply once again.
I have installed erpnext in ubuntu and I have two ip addresses one is internal (static) and one Public, now i want the erpnext for production use that should be accessible through a Public ip as a URL with port 80 or 443, if anyone knows the solution for this please let me know.
I already set the port forwarding in my router, but when I check these ports in the port check tool, they appear closed…how can i open them or know if My ISP blocks them?