Wednesday, 19 December 2012
Own Own Business
I'll explain how to do it along with a quick look at using static NAT to forward packets to a web server, in this article. She wanted to allow PPTP clients to connect from the outside to a VPN server on the inside. A student at one of our seminars asked about port forwarding on a router, recently.
Port Forwarding on a Cisco Router
Here's the configuration on a Cisco 2611 router: It's really a fairly simple process. The process involves forwarding desired packets from the router's outside interface to an internal host, but regardless of how you choose to design it, i recommend isolating those resources in a DMZ to protect your office LAN from the bad guys, generally. Or VPN servers, mail servers, sometimes we have internal resources that need to be Internet-accessible such as Web servers.
Interface Ethernet0/1
Ip address 12.1.2.3 255.255.255.0
Ip nat outside
!
Interface Ethernet0/0
Ip address 192.168.101.1 255.255.255.0
Ip nat inside
!
Ip nat inside source list 101 interface Ethernet0/1 overload
Ip nat inside source static tcp 192.168.101.2 1723 interface Ethernet0/1 1723
!
Access-list 101 permit ip any any
Access-list 101 works in conjunction with the "ip nat inside source list 101 interface Ethernet0/1 overload" statement to permit all inside hosts to use E0/1 to connect to the Internet sharing whatever IP address is assigned to interface Ethernet E0/1. NAT outside is configured on E0/1 and NAT inside is configured on E0/0. Ethernet 0/1 is connected to the public Internet with a static address of 12.1.2.3 and Ethernet 0/0 is connected to the inside network with a static address of 192.168.101.1, in the above configuration.
) (PAT allows multiple internal hosts to share single address on an external interface by appending different port numbers to each connection. The "overload" statement implements PAT (Port Address Translation) which makes that possible.
The statement "ip nat inside source static tcp 192.168.101.2 1723 interface Ethernet0/1 1723" takes incoming port 1723 (PPTP) requests on Ethernet0/1 and forwards them to the VPN server located at 192.168.101.2.
Here's what that would look like: You could do something similar with a Web server by changing port 1723 to port 80 or port 443.
Interface Ethernet0/1
Ip address 12.1.2.3 255.255.255.0
Ip nat outside
!
Interface Ethernet0/0
Ip address 192.168.101.1 255.255.255.0
Ip nat inside
!
Ip nat inside source list 101 interface Ethernet0/1 overload
Ip nat inside source static tcp 192.168.101.2 80 interface Ethernet0/1 80
!
Access-list 101 permit ip any any
We're forwarding HTTP (port 80) traffic, the web server is located at 192.168.101.2 and instead of forwarding PPTP (port 1723) traffic, in this example.
You can configure your Cisco router in a similar manner to forward nearly any type of traffic from an outside interface to an internal host, obviously.
Crawley Copyright (c) 2008 Don R.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment