Smart/RG Router Config for running local web server

Web hosting discussion, programming, and shared and dedicated servers.
9 posts Page 1 of 1
by norwoodj » Tue May 29, 2018 3:20 pm
Has anyone trying configuring a Smart/RG router for running a local web server? Here is what I tried:

Under the Advanced Setup tab, I navigated to NAT-Virtual Servers. There is one existing virtual server using the eth4.1 WAN interface, internal port 16402. I tried adding a virtual server using the IPOE 0 0 35/ atm0.1 WAN interface on port 80. Oviously there is more to it than that.

I can access the server from inside my network, ie 192.168.42.XX, but if I use 'what's my ip address' and try to go to that address, I get this error:

You don't have permission to access /prime-home/control-panel/login on this server.

Can anyone offer some advice on how to set this up? I know I could use the personal web hosting that comes with my sonic account, but this is really meant to be a learning exercise. Any advice or links to documentation would be helpful and appreciated.

thanks,
John
by norwoodj » Tue May 29, 2018 5:08 pm
I have uncovered a clue as to what is happening, but I don't know what it means or if it's even relevant. To login to this router internally, I need to go to 192.168.42.1/admin and this will ask me to login using the wifi password. With the port forwarding setup I can get to the same login form if I type in my IP address followed by /admin (ie, xx.xx.xx.xx/admin). However, the admin username and password don't work. Does this extra information shed any new light?
by ngufra » Tue Jun 05, 2018 8:09 am
When you write "running a local web server" you mean running locally a server and having it accessed from the internet or access locally?

Here is what i typically do to run a web server:

On a computer,
install a web server. e.g. apache.
Ensure the firewall is set to accept connections.
Ensure the web server works locally.

On the router:
in DHCP page, ensure that the computer that is running the web server is always getting the same IP (based on its mac address) e.g. 192.168.1.2

in port forwarding, set redirection for tcp connection on port 80 (for http) or 443 (https) to the ip of the machine running web server (e.g. 192.168.1.2)

To test, use your neighbor connection or use your phone (disconnected from wifi so it uses data plan) and point the web browser to the ip of your sonic connection.

You can also get an account at dyndns or no-ip and install the updater on a computer (can be the same as the one running the web server) so you can view your web server at <yourname>.no-ip.com
by ryanrwggrant » Sun Oct 07, 2018 11:41 am
I have this same problem, please let me know if you found a fix
by raylam » Wed Mar 13, 2019 9:33 pm
norwoodj wrote:Has anyone trying configuring a Smart/RG router for running a local web server? Here is what I tried:

Under the Advanced Setup tab, I navigated to NAT-Virtual Servers. There is one existing virtual server using the eth4.1 WAN interface, internal port 16402. I tried adding a virtual server using the IPOE 0 0 35/ atm0.1 WAN interface on port 80. Oviously there is more to it than that.

I can access the server from inside my network, ie 192.168.42.XX, but if I use 'what's my ip address' and try to go to that address, I get this error:

You don't have permission to access /prime-home/control-panel/login on this server.

Can anyone offer some advice on how to set this up? I know I could use the personal web hosting that comes with my sonic account, but this is really meant to be a learning exercise. Any advice or links to documentation would be helpful and appreciated.

thanks,
John
Hi John, did you figure this out? I'm running into the exact same problem.
by racerlupine » Tue Aug 06, 2019 6:42 am
Y'all need to open port 80 on the router. What follows assumes you have Apache or suchlike installed (Apache used as the example):

1) Make sure Apache is running. Make sure there's a file in the web root directory (i.e. Apache24/htdocs/index.html).

2) Set the IP of the server manually and skip DHCP. You do this by setting the IP of the NIC installed in the server, not through the router. That way it always gets the same IP even when the router reboots.

3) In the router config open port 80 (http) and link it to your server's IP. Make sure port 80 isn't already linked somewhere else, you can only link ports to a single IP at at time.

4) You don't need a domain or dyndns to run your server. Your server's address on the Internet is the same as your Sonic IP. Test it using an Internet connection other than through your own router (so you're not trying to connect through your own external IP). Open a browser and point it at http://[yourSonicIP]/index.html. If you don't know your Sonic IP go to http://www.racerlupine.users.sonic.net/home/showip.php to find out.

5) It's best to have a static IP when running a server out of your own network at home or work. Sonic will give you one free, just ask them. Sonic is so cool.

Any questions let me know. Hope this helps.

RACER
by ds_sonic_asif » Tue Aug 13, 2019 9:44 am
racerlupine wrote: 4) You don't need a domain or dyndns to run your server. Your server's address on the Internet is the same as your Sonic IP. Test it using an Internet connection other than through your own router (so you're not trying to connect through your own external IP). Open a browser and point it at http://[yourSonicIP]/index.html. If you don't know your Sonic IP go to http://www.racerlupine.users.sonic.net/home/showip.php to find out.
Thanks for the idea.

Previously when my firewall machine was directly connected to Comcast, its WAN interface was the external dynamic IP address. To "discover" changes to it, particularly when traveling and wanting to ssh/mosh back home, I had a cron-driven script that would check locally and send an email me whenever it changed.

Now, with the fiber setup, I have not yet removed the Sonic/SmartRG router. So to find my external IP address I used the Sonic mini hosting support and put a page that consists completely of:

Code: Select all

<?php
print_r($_SERVER['REMOTE_ADDR']);
?>
and updated the cron script to do a wget of this page.
by racerlupine » Wed Aug 14, 2019 4:01 am
ds_sonic_asif wrote: Now, with the fiber setup, I have not yet removed the Sonic/SmartRG router. So to find my external IP address I used the Sonic mini hosting support and put a page that consists completely of:

Code: Select all

<?php
print_r($_SERVER['REMOTE_ADDR']);
?>
and updated the cron script to do a wget of this page.
That's actually a clever and elegant solution to the dynamic IP hosting issue, as far as logging yourself on remotely to your server. But you'd still have the problem of how visitors will navigate to your site when your WAN IP changes. Once the change happens all relevant bookmarks and links will break. That won't happen with the static IP. And with Sonic it's free.

hope this helps

RACER
by ds_sonic_asif » Wed Aug 14, 2019 8:09 am
racerlupine wrote:
ds_sonic_asif wrote: Now, with the fiber setup, I have not yet removed the Sonic/SmartRG router. So to find my external IP address ...
That's actually a clever and elegant solution to the dynamic IP hosting issue, as far as logging yourself on remotely to your server. But you'd still have the problem of how visitors will navigate to your site when your WAN IP changes. Once the change happens all relevant bookmarks and links will break. That won't happen with the static IP. And with Sonic it's free.

hope this helps

RACER
I am not the OP in this thread. My need was just to have a simple way to discover my home IP address when traveling, so that I can get to the ssh/mosh port forwards I've configured in the SmartRG. No other visitors to worry about. Your showip.php page gave me the idea.
9 posts Page 1 of 1

Who is online

In total there are 26 users online :: 0 registered, 0 hidden and 26 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 26 guests