ho provato

int atm0 up
Moderatore: Federico.Lagni
Current configuration : 1590 bytes
!
version 12.3
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable secret xxxxxxxxxx
!
ip subnet-zero
!
!
no aaa new-model
!
!
!
no crypto isakmp enable
!
!
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
ip nat inside
hold-queue 100 out
!
interface ATM0
no ip address
no atm ilmi-keepalive
dsl operating-mode auto
pvc 8/35
encapsulation aal5mux ppp dialer
dialer pool-member 1
!
!
interface Dialer0
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1
ppp chap hostname yyyyyy
ppp chap password yyyyy
ppp pap sent-username yyyyy password yyyyyy
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer0
no ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer0 overload
ip nat inside source static tcp 192.168.1.4 800 interface Dialer0 8001
ip nat inside source static tcp 192.168.1.4 1699 interface Dialer0 1699
ip nat inside source static tcp 192.168.1.4 21 interface Dialer0 21
ip nat inside source static tcp 192.168.1.4 80 interface Dialer0 80
!
!
access-list 1 permit 10.0.0.0 0.0.0.255
access-list 1 permit 192.168.1.0 0.0.0.255
!
control-plane
!
!
line con 0
no modem enable
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
password yyyy
login
transport preferred all
transport input all
transport output all
!
scheduler max-task-time 5000
!
end
Router#sh run
Building configuration...
Current configuration : 1841 bytes
!
version 12.3
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable secret xxxxxxxxxxx
!
ip subnet-zero
!
!
no aaa new-model
!
!
!
!
no crypto isakmp enable
!
!
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
ip nat inside
hold-queue 100 out
!
interface ATM0
no ip address
no atm ilmi-keepalive
dsl operating-mode auto
pvc 8/35
encapsulation aal5mux ppp dialer
dialer pool-member 1
!
!
interface Dialer0
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1
ppp chap hostname xxxxxxxxxxxxxxx
ppp chap password xxxxxxxxxx
ppp pap sent-username xxxxxxxxxxx password xxxxxxxxx
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer0
no ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer0 overload
ip nat inside source static tcp 192.168.1.2 5500 interface Dialer0 5500
ip nat inside source static tcp 192.168.1.2 7000 interface Dialer0 7000
ip nat inside source static tcp 192.168.1.4 8000 interface Dialer0 8000
ip nat inside source static tcp 192.168.1.4 16699 interface Diale
ip nat inside source static udp 192.168.1.4 8001 interface Dialer0 8001
ip nat inside source static tcp 192.168.1.4 80 interface Dialer0 80
ip nat inside source static tcp 192.168.1.4 21 interface Dialer0 21
ip nat inside source static tcp 192.168.1.4 6891 interface Dialer0 6891
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
control-plane
!
!
line con 0
no modem enable
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
password xxxxx
login
transport preferred all
transport input all
transport output all
!
scheduler max-task-time 5000
!
end
Method 1 ------------------------------------------------------
The following config will allow the Linux machine (10.1.1.2) to read
the IP address from the DHCP interface on the Cisco router (eth0) as
user ddclient. Since ddclient is configured with a priv level of 1 it
cannot do anything except look at the routers stats, ip addresses,
etc. This should be pretty harmless even if ddclient's password were
to be discovered.
This has been tested with Cisco IOS 12.1(5)T5 running on a Cisco 2621
router.
Cisco Router Config (Assuming eth0 is DHCP interface)
-----------------------------------------------------
user ddclient password password
user ddclient priv 1
ip http auth local
ip http access-class 99
ip http port 1021
ip http server
access-list 99 permit host 10.1.1.2
DDClient Config
---------------------------------------------------
use=cisco, fw=192.168.1.1, if=eth0, fw-login=ddclient, fw-password=password
Method 2 ------------------------------------------------------
use=fw
fw=192.168.1.1/exec/show/interfaces/CR
fw-skip=FastEthernet0/0
fw-login=ddclient
fw-password=xxxxxxxx