LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-17-2006, 01:56 PM   #1
impulse()
Member
 
Registered: May 2006
Posts: 38

Rep: Reputation: 15
Problems with port forwarding


I have a BT Voyager 2100 router where 3 computers connect to this giving them 192.168.1.2, .1.3 and .1.4 addresses where the router is .1.1. This router has a web interface for configuration which runs on port 80. I want any web requests on the the routers IP to be forwarded to a Linux box with Apache running on it. So far this has proved a struggle. I have disabled the web interface on the router and added port 80 forwards to 192.168.1.4 (Linux box) but it just doesn't forward. I can access the web server locally but not externally. I've updated to the latest firmware for the router but port forwarding didn't work before of after this firmware update.
Has anyone else had a web server running on a network with a wireless ADSL router with NAT.
 
Old 05-17-2006, 03:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this is pretty simple stuff. you certainly do not need to (or want to) disable the web server to do what you want. port forwarding on routers is a two stage affair typically. firstly there is the need to allow connections externally to your port of choice and *then* you can look at port forwarding that data. to allow web config access remotely you need to explicitly enable this, so there is no conflict there. try a site like shieldsup to check wether or not any connectivity is being allowed on port 80 externally or the firewall is just dropping the packets.

you might find it easier to use the telnet interface, as things are lais out a lot differently there compared to the web interface.

and btw, did you know that that router just runs busybox? in telnet mode you can just break out of the menu there instantly and skim through the linux subsystem. fairly interesting actually.
 
Old 05-17-2006, 03:55 PM   #3
impulse()
Member
 
Registered: May 2006
Posts: 38

Original Poster
Rep: Reputation: 15
I've tried CTRL+C to break out of it while in telnet but it doesn't do anything. I have a recent firmware so I think may have been patched out.
Do router manufactorers like to keep people out of the shell of their routers?
 
Old 05-18-2006, 01:29 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well i have a 2110 and i'm assumgin it's the same:
Code:
   Main Menu

1.  ADSL Link State
2.  LAN
3.  WAN
4.  DNS Server
5.  Route Setup
6.  NAT
7.  Firewall
8.  Quality Of Service
9.  Management
10. Passwords
11. Reset to Default
12. Save and Reboot
13. Exit
 -> sh


BusyBox v0.60.4 (2006.03.03-03:06+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# ps ax
  PID TTY     Uid        Size State Command
    1         admin      1240   S   init
    2         admin         0   S   [keventd]
    3         admin         0   R   [ksoftirqd_CPU0]
    4         admin         0   S   [kswapd]
    5         admin         0   S   [bdflush]
    6         admin         0   S   [kupdated]
    7         admin         0   S   [mtdblockd]
   13         admin      1296   S   -sh
   48         admin      2760   S   cfm
   90         admin       588   S   pvc2684d
  301         admin      2764   S   sshd
  302         admin      2760   S   telnetd
  308         admin       944   S   bftpd
  309         admin      1224   S   tftpd
  390         admin      2760   S   httpd
  395         admin      9244   S   dproxy
  399         admin      1224   S   pppd -c 0.38.1 -a 0.0.38 
 2867         admin       796   S   upnp -L br0 -W ppp_0_38_1 -D
 2980         admin      2812   S   sshd
 2981 ttyp0   admin      2820   S   sshd
 2998 ttyp0   admin      1284   S   sh -c sh
 2999 ttyp0   admin      1292   S   sh
 3000 ttyp0   admin      1236   R   ps ax
#
 
Old 05-18-2006, 01:43 AM   #5
impulse()
Member
 
Registered: May 2006
Posts: 38

Original Poster
Rep: Reputation: 15
That's pretty cool mate. Cheers for that.
 
Old 05-18-2006, 05:32 PM   #6
impulse()
Member
 
Registered: May 2006
Posts: 38

Original Poster
Rep: Reputation: 15
I have setup port forwarding to port 80 of my Linux box that runs Apache but I can't access this externally. I've changed Apache port to 700 and have added this rule to my port forwarding but with no luck. I've also added my Linux box as DMZ but still doesn't help, whether Apache is on port 80 or 700.
Any ideas mate?
 
Old 05-19-2006, 01:07 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well portforward.com is the best place i've found for specific information on this:

http://portforward.com/english/route...r2100/HTTP.htm

can't get much more specific than that so i'd assume you're missing a step from there.
 
Old 05-20-2006, 06:40 AM   #8
impulse()
Member
 
Registered: May 2006
Posts: 38

Original Poster
Rep: Reputation: 15
If Apache runs on port 80 by default and the web configuration for the router runs on port 80 as default does that mean I have to disable web configuration on the router for the web server to ever work?
If a port forward rule of port 80 is set and also the web config is running on this which one does the router choose to send you to? Apache or router config?

I have tried setting the Linux box as a DMZ and also set a port forward rule but still when I access the IP of the router it goes straight to the web config for the router.

Is buying NO-NAT addresses the only way to solve this problem?

Thanx in advance.
 
Old 05-20-2006, 07:12 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no you don't at all. the web interface runs on the local ip, and the port forwarding is attached to the external address, so they won't conflict.

this is a really simple and basic thing to do... i'll set my 2110 to do it if you really want, but it's very very simple thing to do.
 
Old 05-20-2006, 12:43 PM   #10
impulse()
Member
 
Registered: May 2006
Posts: 38

Original Poster
Rep: Reputation: 15
I understand now. It looked like they were conflicting cause I was accessing the routers IP expecting it to forward to the Apache server but it kept going to the router config. Hours later I realised this would only happen on computers on my internal network.
 
Old 05-20-2006, 02:26 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
doh!

yeah i use a remote proxy when i want to test things like that. there are plenty out there that will relay your web traffic, so when you connect to your domain the http request is done from a remote site.
 
  


Reply



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
Iptables problems with port forwarding jebaird Linux - Networking 3 08-05-2005 12:35 PM
iptables port forwarding problems JCdude2525 Linux - Networking 18 02-09-2005 04:25 PM
IPTable Problems (Port Forwarding)... Arch3Angel Linux - Security 3 12-04-2004 04:56 PM
Problems with port forwarding MS3FGX Linux - Networking 4 01-27-2004 03:22 PM
port forwarding problems robiewp Linux - Networking 43 10-21-2003 09:08 AM

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

All times are GMT -5. The time now is 12:53 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