LinuxQuestions.org
Visit Jeremy's Blog.
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 10-27-2008, 11:29 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
Cisco Router


I have a Cisco 2811 that is connected via FA 01 to a Netgear wireless/router. Everything work fine. I am trying to allow web traffic to get to the web server which sit behind my Netgear/wireless router. Can someone tell me the CLI statement to allow port forwarding via tcp 80 that will router traffic through the Cisco 2811 throught the Netgear/wireless router and to the web server. I know that the Netgear/wireless router has its own firewall and NAT stuff and am wondering if that could be the problem. Everytime I attempt to connect the web server with the current setup from the outside I get the Cisco login page. It says something like priviledge 15 login or something of the sort. I can see that traffic is hitting the Cisco router but not getting through the WGR614L. Help?

Last edited by metallica1973; 10-27-2008 at 11:31 AM.
 
Old 10-27-2008, 12:07 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
well you'll only get the login box if you sent packets *TO* the router, not through it. you're all in private address land there right? so there's no natting to be done on the 2811 from what i can see.
 
Old 10-27-2008, 12:36 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Hi,

Best is to forward all traffic to the firewall, and let the firewall forward port 80 to the webserver

first make sure telnet to the router will work from the outside (if needed)
ip nat inside source static tcp iplan ipwan 23
Remove all natting if present
no ......
forward everything to the firewall
ip nat inside source static ip-server ipwan extendable
 
Old 10-27-2008, 12:37 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
ip-server should be ip-firewall
 
Old 10-27-2008, 12:51 PM   #5
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
I'm assuming that the Netgear box is a home Wireless Access Point / router. It is very likely that it is this that is blocking the traffic. It will most likely be set up to drop any unsolicited packets from the internet.
 
Old 10-27-2008, 02:36 PM   #6
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
It is actually my friends setup. Thanks for all the replies. What everyone is saying is what I suspected from the beginning in that the Cisco router is either configured correctly to route packets through the router and the Netgear Home wireless/router is dropping stuff or that simply the router is not forwarding correctly. I will have my friend connect his web server to a WIC switch port to see if the router is actually forwarding to the web server. Like Robhogg said it is probaly the Netgear wireless/router that is causing the problem. If that is the case then what a major security flaw in the Cisco IOS. Why would it allow a login to the Cisco router after the forwarded packets are either dropped by the Netgear wireless/router or the Cisco router not routing correctly. Why would that be happening?
 
Old 10-27-2008, 02:55 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
>Why would it allow a login to the Cisco router after the forwarded packets are either dropped by the Netgear wireless/router or the Cisco >router not routing correctly. Why would that be happening?

Because the router is configured to use port 80 for http login to configure it
You should disable this, and eventualy enable telnet for configuration

no ip http server
no ip http secure-server

you can use the accesslist so only a certain IP or IPrange can access the routerconfiguration via telnet
 
Old 10-27-2008, 03:16 PM   #8
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Here is the Cisco Router Config:

PHP Code:
Current configuration 1445 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password
-encryption
!
hostname DTMFP
!
enable secret 5 $AX$#XRWEX$XX
enable password XXXXXXXX
!
username DTMFP password 0 XXXXXXXX
username CRWS_Shashi privilege 15 password 0 $DDQ
%QGTFGSWEDT$%
ip subnet-zero
ip name
-server 4.2.2.5
ip name
-server 4.2.2.6
!
ip dhcp pool DTMFP
   import all
   network 192.168.1.0 255.255.255.0
   
default-router 192.168.1.1 
   dns
-server 4.2.2.5 
   lease infinite
!
ip urlfilter alert
ip audit notify log
ip audit po max
-events 100
!

!
!
!
!
interface 
Ethernet0
 description CRWS Generated text
Please do not delete this:192.168.1.1-255.255.255.0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 no cdp enable
 hold
-queue 32 in
 hold
-queue 100 out
!
interface 
Ethernet1
 description Internet
 ip address dhcp client
-id Ethernet1
 no ip redirects
 no ip unreachables
 no ip proxy
-arp
 ip nat outside
 no ip mroute
-cache
 duplex auto
 no cdp enable
!
ip nat inside source list interface Ethernet1 overload
ip nat inside source 
static tcp 192.168.2.4 80 interface Ethernet1 80
ip classless
ip http server
no ip http secure
-server
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
no cdp run
!
line con 0
 no modem enable
 stopbits 1
line aux 0
 no modem enable
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
 exec
-timeout 120 0
 password XXXXXXXXXXX
 login local
 length 0
!
scheduler max-task-time 5000
end 
The LAN interface FA 0/0 is a 192.168.1.0 subnet and the Netgear is a 192.168.2.0. Is this the correct statement to forward port 80 traffic to the IIS server which is 192.168.2.4 which sits behind the Netgear wireless router?

PHP Code:
ip nat inside source static tcp 192.168.2.4 80 interface Ethernet1 80 
 
Old 10-27-2008, 05:24 PM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
looks OK
only,

ip http server
to disable webaccess for configuration.
should be
no ip http server

to enable telnet access
ip nat inside source static tcp 192.168.1.1 23 Ethernet1 23
 
Old 10-27-2008, 07:33 PM   #10
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I will look into this issue a little further.
 
Old 10-28-2008, 05:10 AM   #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
no no no no no telnet is evil. do not ever use telnet. don't use it. do not enable it.
 
Old 10-28-2008, 05:25 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
I Agree, but then you need to configure ssh on the cisco,
however for that you need a Data Encryption Standard (DES) or triple DES (3DES) IPSec encryption version of the IOS.
I don't know if they want to have access from the outside.
 
Old 10-28-2008, 05:34 AM   #13
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
yes, so use ssh, job done. just need a k9 image.
 
Old 10-28-2008, 08:42 AM   #14
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
can you give me a quick how-to on disable telnet on the Cisco router?

PHP Code:

router
#config t
router(config)#line vty 0 4
router(config-line)#transport input none 
or
PHP Code:

router
#configure terminal
router#line vty 0 4
router#no login 

Last edited by metallica1973; 10-28-2008 at 09:18 AM.
 
Old 10-28-2008, 11:33 AM   #15
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
line vty 0 4
transport input none

or
transport input ssh

if you want just ssh access
 
  


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
Cisco 831 Cisco Router and Cable Modem metallica1973 Linux - Networking 3 07-14-2008 08:00 PM
LXer: Will an open source router replace your Cisco router? LXer Syndicated Linux News 1 03-21-2007 09:04 AM
which cisco router robrecc Linux - Networking 3 12-29-2006 10:39 PM
cisco router OS? blackzone Linux - Networking 1 07-21-2004 08:35 AM
cisco router help numnuttz Linux - Software 5 03-18-2003 10:01 AM

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

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