LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-14-2015, 09:01 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
How to configure router - port forwarding


Hi all,

I'm trying to forward port 80 to internal IP 192.168.0.xxx

Router TP Link
Model TL-WR740N

-> Forwarding
Service Port 80
Internal Port - blank
IP Address - 192.168.0.xxx
Protocol - ALL
Status - Enabled
Common Service Port - HTTP

-> Save

Error
Code:
Error code: 14007
Error: The ports of the remote web management and the virtual server are conflicted.
Please help

Regards
satims
 
Old 04-15-2015, 02:25 AM   #2
Bruce783
LQ Newbie
 
Registered: Apr 2015
Location: Kommetjie, Cape Town, ZA
Distribution: Gentoo
Posts: 11

Rep: Reputation: Disabled
There is probably a management web interface listening on 80. Configure the management web interface to listen on a different port and then try again.
 
Old 04-15-2015, 03:18 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by Bruce783 View Post
There is probably a management web interface listening on 80. Configure the management web interface to listen on a different port and then try again.
Hi,

Thanks for your advice.

I found it. The router default setting takes up this port. Now I have 2 options;
1) change the default setting listening to port 8080 and forward port 80 to the remote PC which in my case is the guest of KVM running Apache web server.

OR

2) retain the default setting and forward port 8080 to the remote PC. But I have no idea how to make this change on the guest listening port 8080 instead of 80. Besides can visitors browse the websites on the server if forwarding port 8080 instead of port 80?

Please advise. Thanks

Regards
satimis
 
Old 04-15-2015, 05:28 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,253

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
1. depends on the router. need to check the manual...
2. in that case they can reach that server by: http://host:8080/some/path/..., you need to tell the user they need to specify the port.
 
Old 04-15-2015, 06:28 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by pan64 View Post
1. depends on the router. need to check the manual...
I'll consult the techical support of TP-Link agent to clarify it. There is no manual with its delivery.

Quote:
2. in that case they can reach that server by: http://host:8080/some/path/..., you need to tell the user they need to specify the port.
Performed following test on a PC running Virtualbox
Host - Ubuntu 14.04
VM - Apache web server running on Ubuntu 14.04 desktop

On router (Forwarding)
Service Port 8080
Internal Port - blank
IP Address - 192.168.0.xxx
Protocol - ALL
Status - Enabled
Common Service Port - not selected

On VM browser running;
http://localhost/subdomain

It browses the website

On Host browser running:
http://192.168.0.xxx:8080/localhost/subdomain
Code:
Unable to connect

Firefox can't establish a connection to the server at 192.168.0.xxx:8080.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
There is no firewall. Please help. Thanks

Regards
satimis
 
Old 04-15-2015, 06:36 AM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,878

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
You very probably don't want your router management listening on your external interface anyway - turn it off.

Also if you put 80 in the Internal Port, your last effort will succeed.
 
Old 04-15-2015, 07:33 AM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by descendant_command View Post
You very probably don't want your router management listening on your external interface anyway - turn it off.

Also if you put 80 in the Internal Port, your last effort will succeed.
Hi,

Switch off the router

On Host browser
http://192.168.0.xxx
showing:
Apache2 Ubuntu Default Page
It works
with Ubuntu logo

http://192.168.0.xxx/subdomain
http://192.168.0.xxx/localhost/subdomain
all "Unable to connect"
Code:
Not Found
The requested URL /localhost/subdomain was not found on this server.
Apache/2.4.7 (Ubuntu) Server at 192.168.0.xxx Port 80

Switch on the router

Service Port 8080
Internal Port - 80
IP Address - 192.168.0.xxx
Protocol - ALL
Status - Enabled
Common Service Port - not selected

http://192.168.0.xxx
showing:
Apache2 Ubuntu Default Page
It works
with Ubuntu logo

http://192.168.0.xxx:8080/localhost/subdomain
http://192.168.0.xxx:8080/subdomain
http://192.168.0.xxx:8080
all "Unable to connect"

Thanks

Regards
satimis
 
Old 04-15-2015, 08:27 AM   #8
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,878

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
Quote:
Originally Posted by satimis View Post
Hi,

Switch off the router
No, switch of the remote management on your PUBLIC interface.Did you add 8080 to your apache config now?
You don't need to.
You only use 8080 from an external machine - your router forwards that to 80 on the apache host.
Local machines just use 80 as per normal.
 
Old 04-15-2015, 09:59 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by descendant_command View Post
No, switch of the remote management on your PUBLIC interface.

Did you add 8080 to your apache config now?
You don't need to.
You only use 8080 from an external machine - your router forwards that to 80 on the apache host.
Local machines just use 80 as per normal.
Hi,

Router remote management closed. I haven't edited apache config in this test.

Now on host browser running;
http://192.168.0.xxx/subdomain

the home page can be displayed but in complete disorder.

Please refer to the attached screenshot:
Screenshot_from_host

compared to the home page browsed on VM running http://localhost/subdomain
Screenshot_from_VM

satimis
Attached Thumbnails
Click image for larger version

Name:	Screenshot_from_host.png
Views:	46
Size:	139.1 KB
ID:	18121   Click image for larger version

Name:	Screenshot_from_vm.jpg
Views:	39
Size:	45.2 KB
ID:	18122  
 
Old 04-15-2015, 03:48 PM   #10
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,878

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
OK.
That is a separate problem, most likely bad pathnames in your site links.

Backing up a bit - if you are only trying this from machines on your LAN (as indicated by the 192.168.x.x addressing) then port forwarding on your router has nothing to do with anything.
 
Old 04-15-2015, 06:39 PM   #11
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by descendant_command View Post
OK.
That is a separate problem, most likely bad pathnames in your site links.

Backing up a bit - if you are only trying this from machines on your LAN (as indicated by the 192.168.x.x addressing) then port forwarding on your router has nothing to do with anything.
This is only a test.

I'm prepared running my websites on VMs which can be visited on Internet. Currently my websites are hosted on Godaddy server with copy websites on local servers, i.e. VMs. My planning is when the local websites are up visitors will browse them on Internet, not on Godaddy server. When the local websites are down visitors will browse the websites on Godaddy server.

But I must make sure the local websites can be browsed on other machines.

Regards
satimis
 
Old 04-16-2015, 06:30 AM   #12
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,878

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
Quote:
Originally Posted by satimis View Post
This is only a test.
To test port forwarding, you need to do it from "outside".
 
Old 04-16-2015, 09:23 AM   #13
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by descendant_command View Post
To test port forwarding, you need to do it from "outside".
Advice noted.

I'll test it after updating the subdomain for test on
Godaddy server pointing to the fixed IP of my PC.

Thanks

Regards
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ubuntu router/port forwarding raeif Linux - Networking 9 07-17-2014 04:36 PM
port forwarding without router jkeertir Linux - Newbie 3 09-17-2009 10:56 AM
Port Forwarding For Router kool_kid Linux - Networking 4 09-25-2007 02:10 PM
port forwarding on Belkin 4-port Cable/DSL Gateway Router sycamorex Linux - Networking 5 03-05-2007 03:27 PM
Port forwarding on a wireless router. impulse() Linux - General 4 05-18-2006 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration