12-30-2021 12:02 PM
Hello,
I have a few questions as im a new on this.
I have an 876 DSL router with ip address 192.168.20.253 and i need to allow port forword to ip 192.168.20.252 and port 5123 . I am quite confused with the NAT statements.
I have a public IP (from ISP) of (example) 79.158.6.12
What is the commands i should use on the router?
Thanks!!
Solved! Go to Solution.
12-30-2021
12:55 PM
- last edited on
01-04-2022
01:49 AM
by
Translator
Hello
Based on the information you have supplied; the general assumption is that you have connectivity to the internet already and that you will use domain NAT44 with both your WAN/LAN interfaces with nat domain applied to both of them.
Also, that you will require a static PAT statement between a specific internal host and a public assigned wan ip address, plus a general PAT statement for all other internal hosts
Example:
int x/x
example WAN
ip address 79.158.6.12 255.255.255.248
ip nat outside
int x/x
example LAN
ip address 192.168.20.253 255.255.255.0
ip nat inside
access-list 1 permit 192.168.20.0 0.0.0.255
ip nat inside source static tcp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source static udp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source list 1 interface <wan interface>
12-30-2021
12:16 PM
- last edited on
01-04-2022
04:31 AM
by
Translator
Hello,
you mean;
ip nat inside source static tcp 192.168.20.252 5123 79.158.6.12 5123
?
12-30-2021 12:43 PM
Thanks Georg Pauwen for the fast reply!!
Yes that is what i mean. But is that the only thing i have to do? I dont have to mesh arround with the ports?
12-30-2021
12:55 PM
- last edited on
01-04-2022
01:49 AM
by
Translator
Hello
Based on the information you have supplied; the general assumption is that you have connectivity to the internet already and that you will use domain NAT44 with both your WAN/LAN interfaces with nat domain applied to both of them.
Also, that you will require a static PAT statement between a specific internal host and a public assigned wan ip address, plus a general PAT statement for all other internal hosts
Example:
int x/x
example WAN
ip address 79.158.6.12 255.255.255.248
ip nat outside
int x/x
example LAN
ip address 192.168.20.253 255.255.255.0
ip nat inside
access-list 1 permit 192.168.20.0 0.0.0.255
ip nat inside source static tcp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source static udp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source list 1 interface <wan interface>
12-31-2021
01:48 AM
- last edited on
01-04-2022
04:30 AM
by
Translator
Ok thank you very much Paul!!!
So in my case, i am using adsl port, i have to:
ip nat inside source static tcp 192.168.20.252 5123 dialer 1 5123
int dialer 1
ip nat outside
int vlan 1
ip nat inside
Am i correct?
Also how i identify the dialer (0,1) i have to use?
When i execute show dialer i get:
#show dialer
BRI0 - dialer type = ISDN
Dial String Successes Failures Last DNIS Last status
0 incoming call(s) have been screened.
0 incoming call(s) rejected for callback.
BRI0:1 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is shutdown
BRI0:2 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is shutdown
Di0 - dialer type = DIALER PROFILE
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is data link layer up
Number of active calls = 0
Dial String Successes Failures Last DNIS Last status
Di1 - dialer type = NONE
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Number of active calls = 0
Dial String Successes Failures Last DNIS Last status
AND
#show interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0 connected 1 a-full a-100 10/100BaseTX
Fa1 connected 1 a-full a-100 10/100BaseTX
Fa2 notconnect 1 auto auto 10/100BaseTX
Fa3 notconnect 1 auto auto 10/100BaseTX
Thanks in advance
12-31-2021
03:07 AM
- last edited on
01-04-2022
01:59 AM
by
Translator
Hello
When using PPPoA connection, the dialler interface tied to a atm interface via a dialler pool member.
This atm interface is configured with the isp supplied encapsulation for signalling the the DSLAM, dialer 0 interface is default.
Example:
dsl operating-mode auto
interface ATM x
no ip address
pvc x/x <provided by isp
encapsulation <provided by isp
ip nat outside
dialer pool-member 1
interface Dialer0
ip address negotiated
dailer group 1
dialer pool 1
encapsulation ppp
ppp authentication chap
ip mtu 1492
dialer-list 1 protocol ip permit
access-list 1 permit 192.168.20.0 0.0.0.255
int vlan x
ip nat inside
ip nat inside source static tcp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source static udp 192.168.20.252 5123 79.158.6.12 5123
ip nat inside source list 1 interface dialer0
ip route 0.0.0.0 0.0.0.0 dialer 0
12-31-2021 03:23 AM
Hello,
post your entire running configuration (sh run) so we can check if the required lines are in there...
12-31-2021
03:54 AM
- last edited on
01-04-2022
02:16 AM
by
Translator
Hello!!
Here is the running conf. I have included the portforward.
Now i have to run "Copy running-config startup-config" or something in order to activate it???
#show run
Building configuration...
Current configuration : 6990 bytes
!
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname xxx-xxxxx
!
boot-start-marker
boot-end-marker
!
security authentication failure rate 3 log
security passwords min-length 6
logging buffered 51200
logging console critical
enable secret 5 $1$w8ps$Uip3cPveWlkH7Yf18WLS./
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local
!
!
aaa session-id common
clock timezone PCTime 2
clock summer-time PCTime date Mar 30 2003 3:00 Oct 26 2003 4:00
!
crypto pki trustpoint TP-self-signed-1271697366
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1271697366
revocation-check none
rsakeypair TP-self-signed-1271697366
!
!
crypto pki certificate chain TP-self-signed-1271697366
certificate self-signed 01
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
quit
dot11 syslog
no ip source-route
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.20.1 192.168.20.49
ip dhcp excluded-address 192.168.20.201 192.168.20.254
!
ip dhcp pool sdm-pool1
import all
network 192.168.20.0 255.255.255.0
dns-server 212.205.212.205 195.170.0.1
default-router 192.168.20.253
!
!
no ip bootp server
ip domain name yourdomain.com
ip name-server 212.205.212.205
ip name-server 195.170.0.1
!
multilink bundle-name authenticated
!
!
username dataway privilege 15 secret 5 $1$Ozqk$NqNmZawXU9YXZNkpsY.q01
!
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key SubComaNtanTE8294MarcoS address xx.xx.xx.xx
!
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
crypto map SDM_CMAP_1 1 ipsec-isakmp
description Tunnel to xx.xx.xx.xx
set peer xx.xx.xx.xx
set transform-set ESP-3DES-SHA
match address 100
!
archive
log config
hidekeys
!
!
ip tcp synwait-time 10
ip ssh time-out 60
ip ssh authentication-retries 2
!
!
!
interface BRI0
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
encapsulation hdlc
ip route-cache flow
shutdown
!
interface ATM0
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip route-cache flow
no atm ilmi-keepalive
dsl operating-mode auto
!
interface ATM0.1 point-to-point
description $ES_WAN$$FW_OUTSIDE$
pvc 8/35
pppoe-client dial-pool-number 1
!
!
interface FastEthernet0
!
interface FastEthernet1
!
interface FastEthernet2
!
interface FastEthernet3
!
interface Vlan1
description $ETH-SW-LAUNCH$$INTF-INFO-HWIC 4ESW$$ES_LAN$$FW_INSIDE$
ip address 192.168.20.253 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat inside
ip virtual-reassembly
ip route-cache flow
ip tcp adjust-mss 1412
!
interface Dialer0
ip address negotiated
no ip redirects
no ip unreachables
no ip proxy-arp
ip mtu 1452
ip nat outside
ip virtual-reassembly
encapsulation ppp
ip route-cache flow
dialer pool 1
dialer-group 1
no cdp enable
ppp authentication chap pap callin
ppp chap hostname xxxx@otenet.gr
ppp chap password 7 0000000000000
ppp pap sent-username xxxx@otenet.gr password 7 00000000000
crypto map SDM_CMAP_1
!
interface Dialer1
no ip address
no cdp enable
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Dialer0
!
!
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat inside source static tcp 192.168.20.250 8000 interface Dialer0 8000
ip nat inside source static tcp 192.168.20.250 8010 interface Dialer0 8010
ip nat inside source static tcp 192.168.20.250 2554 interface Dialer0 2554
ip nat inside source static tcp 192.168.20.253 5123 interface Dialer0 5123
ip nat inside source route-map SDM_RMAP_1 interface Dialer0 overload
!
logging trap debugging
access-list 1 remark INSIDE_IF=Vlan1
access-list 1 remark SDM_ACL Category=2
access-list 1 permit 192.168.20.0 0.0.0.255
access-list 100 remark CCP_ACL Category=4
access-list 100 remark IPSec Rule
access-list 100 permit ip 192.168.20.0 0.0.0.255 192.168.21.0 0.0.0.255
access-list 101 remark CCP_ACL Category=2
access-list 101 remark IPSec Rule
access-list 101 deny ip 192.168.20.0 0.0.0.255 192.168.21.0 0.0.0.255
access-list 101 permit ip 192.168.20.0 0.0.0.255 any
dialer-list 1 protocol ip permit
no cdp run
!
!
!
route-map SDM_RMAP_1 permit 1
match ip address 101
!
!
control-plane
!
banner exec ^C
% Password expiration warning.
-----------------------------------------------------------------------
Cisco Router and Security Device Manager (SDM) is installed on this device and
it provides the default username "cisco" for one-time use. If you have already
used the username "cisco" to login to the router and your IOS image supports the
"one-time" user option, then this username has already expired. You will not be
able to login to the router with this username after you exit this session.
It is strongly suggested that you create a new username with a privilege level
of 15 using the following command.
username <myuser> privilege 15 secret 0 <mypassword>
Replace <myuser> and <mypassword> with the username and password you want to
use.
-----------------------------------------------------------------------
^C
"banner login ^C"Authorized access only!
Disconnect IMMEDIATELY if you are not an authorized user!^C
!
line con 0
no modem enable
transport output telnet
line aux 0
transport output telnet
line vty 0 4
transport input telnet ssh
!
scheduler max-task-time 5000
scheduler allocate 4000 1000
scheduler interval 500
end
12-31-2021 05:27 AM
Ok i found my mistake. Instead of using the IP of the PC(192.168.20.250) i used the ip of the router...
I tried to change it with the no command but it didn't work. Any clue???
12-31-2021 08:46 AM
Hello,
--> Ok i found my mistake. Instead of using the IP of the PC(192.168.20.250) i used the ip of the router...
What do you mean by that ?
I tried to change it with the no command but it didn't work. Any clue???
--> Which command does not work ? What are you trying to change ?
12-31-2021 03:28 AM
Cisco 876 Series integrated services routers offer: High performance for broadband access in small offices Enhanced security, including: Stateful Inspection Firewall IP Security (IPSec) VPNs (Triple Data Encryption Standard [3DES] or Advanced Encryption Standard [AES]) Intrusion prevention system (IPS) Antivirus support through Network Admission Control (NAC) and enforcement of secure access policie 4-port 10/100 managed switch with VLAN support Secure WLAN 802.11b/g option with use of multiple antennas Easy setup, deployment, and remote management capabilities through Web-based tools and Cisco IOS Ome tv Software.
12-31-2021
06:41 AM
- last edited on
01-04-2022
02:17 AM
by
Translator
Hello
Please confirm is your dsl is via pppoa or ppoe
ATM interfaces are tied with ppoa
physical interfaces are used for ppoe and both utilise dialler interfaces
example:
PPPoA
interface ATM.0.x
no ip address
pvc x/x <provided by isp
encapsulation <provided by isp
dialer pool-member 1
PPPoe
interface fa0/0
pppoe-client dial-pool-number 1
12-31-2021
07:01 AM
- last edited on
01-04-2022
04:33 AM
by
Translator
I am OK with dsl.
My mistake is that Instead of using the IP of the PC(192.168.20.250) i used the ip of the router...
ip nat inside source static tcp 192.168.20.253 5123 interface Dialer0 5123
I tried to change it with the no command but it didn't work. Any clue???
12-31-2021
07:18 AM
- last edited on
01-04-2022
02:18 AM
by
Translator
Hello
Try clearing all translations first, if it doesn't work post the error it shows?
clear ip nat translation * force
no ip nat inside source static tcp 192.168.20.253 5123 interface Dialer0 5123
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide