Cisco 1760 config: NAT from 10mbit wan interface to 100mbit lan interface with DHCP Server

Using 1334 out of 29688 bytes
!
! Last configuration change at 08:57:51 UTC Sat Mar 4 2006
! NVRAM config last updated at 09:00:05 UTC Sat Mar 4 2006
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname bgw.sk.mcn.dk
!
logging queue-limit 100
enable secret 5 $1$S3CR3TSH1t
enable password SecretShit
!
ip subnet-zero
!
!
ip dhcp excluded-address 192.168.1.1 192.168.1.200
ip dhcp excluded-address 192.168.1.250 192.168.1.255
!
ip dhcp pool 192.168.1.0/24
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 217.195.176.77 217.195.176.76
domain-name sk.mcn.dk
!
!
!
!
!
!
bridge irb
!
!
interface ATM0/0
no ip address
shutdown
no atm ilmi-keepalive
dsl equipment-type CPE
dsl operating-mode GSHDSL symmetric annex A
dsl linerate AUTO
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip nat inside
no ip mroute-cache
speed auto
full-duplex
!
interface Ethernet1/0
ip address dhcp
ip nat outside
full-duplex
!
ip nat inside source list 1 interface Ethernet1/0 overload
ip classless
no ip http server
no ip http secure-server
!
!
!
access-list 1 permit 192.0.0.0 0.255.255.255
!
bridge 1 protocol ieee
bridge 1 route ip
!
line con 0
line aux 0
line vty 0 4
password SecretShit
login
!
no scheduler allocate
en

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

create a list of java source files from a recursive directory

I use this to produce a list of all java source files I need to build.

(Need GnuWin32 grep and coreutils packages)

dir *.java /s /B | grep -i java | cut -d\ -f7- > srcfiles.txt

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Cisco 1760 DHCP Server (Untested)

conf t
service dhcp
ip dhcp pool 192.168.1.0/24
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 192.168.1.5 192.168.1.6
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.199
ip dhcp excluded-address 192.168.1.241 192.168.1.255
^Z

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

IOS Firewall

http://articles.techrepublic.com.com/5100-1035-1040244.html

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

Setting up NAT on Cisco 1760

Using 1011 out of 29688 bytes
!
! Last configuration change at 17:30:36 UTC Fri Feb 24 2006
! NVRAM config last updated at 17:32:38 UTC Fri Feb 24 2006
!
version 12.2
service config
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname bgw.sk.mcn.dk
!
logging queue-limit 100
!
ip subnet-zero
!
bridge irb
!
interface ATM0/0
no ip address
shutdown
no atm ilmi-keepalive
dsl equipment-type CPE
dsl operating-mode GSHDSL symmetric annex A
dsl linerate AUTO
!
interface FastEthernet0/0
ip address 192.168.123.1 255.255.255.0
ip nat inside
no ip mroute-cache
speed auto
!
interface Ethernet1/0
ip address dhcp
ip nat outside
half-duplex
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
no ip http server
no ip http secure-server
!
access-list 1 permit 192.0.0.0 0.255.255.255
!
bridge 1 protocol ieee
bridge 1 route ip
!
line con 0
line aux 0
line vty 0 4
!
no scheduler allocate
end

bgw.sk.mcn.dk#

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

MCN Net V 1.0

vlan database
vlan 2 name SKNET
vlan 21 name MCN-DMZ
vlan 22 name MCN
exit
conf t
in fa0/1
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan all
exit
in fa0/2
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan all
exit
in fa0/3
switchport mode access
switchport access vlan 22
exit
in fa0/4
switchport mode access
switchport access vlan 22
exit
in fa0/5
switchport mode access
switchport access vlan 22
exit
in fa0/6
switchport mode access
switchport access vlan 22
exit
in fa0/7
switchport mode access
switchport access vlan 22
exit
in fa0/8
switchport mode access
switchport access vlan 22
exit
in fa0/9
switchport mode access
switchport access vlan 22
exit
in fa0/10
switchport mode access
switchport access vlan 22
exit
in fa0/11
switchport mode access
switchport access vlan 22
exit
in fa0/12
switchport mode access
switchport access vlan 22
exit
in fa0/13
switchport mode access
switchport access vlan 22
exit
in fa0/14
switchport mode access
switchport access vlan 22
exit
in fa0/15
switchport mode access
switchport access vlan 22
exit
in fa0/16
switchport mode access
switchport access vlan 22
exit
in fa0/17
switchport mode access
switchport access vlan 2
exit
in fa0/18
switchport mode access
switchport access vlan 2
exit
in fa0/19
switchport mode access
switchport access vlan 2
exit
in fa0/20
switchport mode access
switchport access vlan 2
exit
in fa0/21
switchport mode access
switchport access vlan 2
exit
in fa0/22
switchport mode access
switchport access vlan 2
exit
in fa0/23
switchport mode access
switchport access vlan 2
exit
in fa0/24
switchport mode access
switchport access vlan 2
exit
exit

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Recovering a partition table or masterblock after weird crashes

If your boss accidently overwrites the first few megabytes of you harddrive, both the partition table, and the superblock, all is lost. Or is it?

Boot the machine in any way you can, and if it’s not already there, get the tool called ‘testdisk’.

Debian / Ubuntu:
# apt-get install testdisk
Gentoo:
# emerge -av testdisk

testdisk can scan the disk for partition boundaries, so if you can remember some of the layout, it’s proably possible to restore the partition table.
Also it can scan the partitions for possible ext2 superblock backups, and restore them, if the main superblock has gone AWOL.

Just a hint 😉

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

APC UPS Deamon for Linux

how to install APC UPS CS500 on linux

Install APCUPS Deamon:
Debian:
# apt-get install apcupsd
Gentoo:
emerge -av apcupsd

Edit /etc/apcupsd/apcupsd.conf:

1: If running on USB, set UPSTYPE to usb (default is apcsmart)
2: If running on USB, set DEVICE to noting, if RS-232, set the serial device in stead.
3: If running a slave deamon, connecting to another host, which has the connection to the UPS, set DEVICE to net and DEVICE to hostname:port (default port is 3551)
4: If running a master deamon, which other hosts need to connect to, change NISIP to 0.0.0.0 or appropriate subnet address.

Edit /etc/default/apcupsd, set ISCONFIGURED=yes

Plug in the UPS Cable.

Fire up the deamon:
# /etc/init.d/apcupsd start

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

ASN.1 to Java conversion

Extract the keys you need from details in JMibBrowser, only Name, Parent and Number.

Use the following Find and replace in Visual Studio:

Find:
(.*Name:b*\::b*){:i}\n(.*Parent:b*\::b*){:i}\n(.*Number:b*\::b*){:z}

Replace:
public static final String \1 = \2 + “.\3”;

more to come…

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

HT-TXQ120 Region unlock

Jeg aner ikke hvor længe dette virker, om det skal gøres hvergang du vil se en film eller om afspilleren husker det. Jeg ved det gjorde sådan at jeg kunne se mine Region 1 startrek DVD’er.

Fjern DVD’en så maskinen er tom

Tryk: Enter
Efterfulgt af flg. talkombination hurtigt efter hinanden: 8,4,2,6,9
Afslut med: Enter

nu kan du sætte en hvilken somhelst regions cd i og afspille den(har dog kun verificeret dette med region 1 cd’er)

Udgivet i Knowledge Base, Old Base | Skriv en kommentar