Cisco dnat (Port ing) settings

Source: Internet
Author: User
Tags domain lookup

 

Cisco dnat (Port ing) settings

 

The experiment topology is as follows:

 

Tutorial purpose: to learn how to debug the DNAT configuration so that the IP address range of 192.168.1.0/24 can be connected to 192.168.2.100 through a remote desktop. dnat is used in the middle.

 

Lab requirement: the IP Address 192.168.1.0/24 can be connected to 192.168.2.100 through Remote Desktop Connection. DNAT on Router2

 

First, configure the network accessibility, and the network segment 192.168.2.0/24 can be NAT to 192.168.1.100, and then configure the DNAT Policy

The configuration that can be NAT to 192.168.1.100 is as follows:

Router2 # show running-config

Building configuration...

 

Current configuration: 916 bytes

!

Version 12.4:

Service timestamps debug datetime msec

Service timestamps log datetime msec

No service password-encryption

!

Hostname router2

!

Boot-start-marker

Boot-end-marker

!

!

No aaa new-model

!

Resource policy

!

Ip cef

!

!

No ip dhcp use vrf connected

!

Ip dhcp pool dhcppool

Network 192.168.2.0 255.255.255.0

Default-router 192.168.2.1

Dns-server 202.106.0.20 202.106.46.151

!

!

No ip domain lookup

!

!

!

!

!

!

Interface FastEthernet0/0

Ip address 192.168.2.1 255.255.255.0

Ip nat inside

Duplex auto

Speed auto

!

Interface FastEthernet0/1

Ip address 192.168.1.100 255.255.255.0

Ip nat outside

Duplex auto

Speed auto

!

Ip route 0.0.0.0 0.0.0.0 192.168.1.2

!

Ip http server

No ip http secure-server

Ip nat inside source list 1 interface FastEthernet0/1 overload

!

Access-list 1 permit 192.168.2.0 0.0.255

!

Control-plane

!

!

Line con 0

Logging synchronous

Line aux 0

Line vty 0 4

!

!

End

Test whether the Internet can be accessed normally.

 

 

The key is DNAT,

The command is as follows:

Router2 # conf t

Router2 (config) # ip nat inside source static tcp 192.168.2.100 3389 interface fastEthernet 0/1 3389

Router2 (config) # end

Router2 # wr

* Mar 2 07:08:40. 959: % SYS-5-CONFIG_ I: Configured from console by console

Router2 # wr

Building configuration...

[OK]

Router2 #

 

 

Debugging completed

Go to 192.168.1.0/24 to test the CIDR block.

 

 

OK. The test is successful !!!

 

This article is from the "still, always, always" blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.