Posts mit dem Label Computer werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Computer werden angezeigt. Alle Posts anzeigen

Samstag, August 21, 2010

Cisco ASA and lot of email recipients

Those days we faced the problem that we recived a mail with approx 150 recipients.
Somewhere in the communication it seams that a mail address is broken by the asa.

On the Outside of the ASA you see following in the trace:

        Inside E-Mail Server (Blue) mail.example.com
        Outside E-Mail Server (Red) mail.asdf.com
        220-mail.example.com ESMTP Server [Wed, 18 Aug 2010 10:30:58 +0200]
        220-Ready to recycle your bits, but we don't want 
        220 your unsolicited or bulk e-mail (ie: spam) 
        EHLO mail.asdf.com 
        250-mail.example.com Hello mail.asdf.com [192.168.0.1] 
        250-SIZE 4194304
        250-PIPELINING 
        250-AUTH PLAIN LOGIN CRAM-MD5 NTLM 
        250-STARTTLS 
        250 HELP 
        MAIL FROM:<asdf@asdf.com> SIZE=42157 
        RCPT TO:<user1@example.com> 
        <output omited> 
        RCPT TO:<user20@example.com> 
        RCPT TO:<user21@ 
        250 OK 
        example.com> 
        RCPT TO:<user22@example.com> 
        RCPT TO:<user23@example.com> 
        RCPT TO:<user24@example.com>
        <output omited> 
        250 Accepted 
        <output omited> 
        250 Accepted 
        
            501 <user21@XXXXXXXXXXXXXX: '>' missing at end of address
          
        250 Accepted 
        250 Accepted
        250 Accepted

On the Inside of the ASA you see following in the trace:

        Inside E-Mail Server (Blue) mail.example.com
        Outside E-Mail Server (Red) mail.asdf.com
        220-mail.example.com ESMTP Server [Wed, 18 Aug 2010 10:30:58 +0200]
        220-Ready to recycle your bits, but we don't want
        220 your unsolicited or bulk e-mail (ie: spam)
        EHLO mail.asdf.com
        250-mail.example.com Hello mail.asdf.com [192.168.0.1]
        250-SIZE 4194304
        250-PIPELINING
        250-AUTH PLAIN LOGIN CRAM-MD5 NTLM
        250-STARTTLS
        250 HELP
        MAIL FROM:<asdf@asdf.com> SIZE=42157
        RCPT TO:<user1@example.com>
        <output omited> 
        RCPT TO:<user20@example.com>
        RCPT TO:<user21@ 250 OK
        XXXXXXXXXXXXXX
        RCPT TO:<user22@example.com>
        RCPT TO:<user23@example.com>
        RCPT TO:<user24@example.com>
        <output omited> 
        250 Accepted
        <output omited> 
        250 Accepted
        
            501 <user21@XXXXXXXXXXXXXX: '>' missing at end of address
          
        250 Accepted
        250 Accepted
        250 Accepted

This is a little bit strange so i will ask the Guys from Cisco if this is a known feature or a bug.

For the Momemt we have disabled the esmtp fixup, on monday we will do future analysis.

If you feel this helps a bit or may be not ? Please leave a comment.

Powered by Zoundry Raven

Enterasys C2 Switch Traffic Shaping

Configuring Traffic Shaping on the Enterasys C2 Switch.

Enterasys C2 SNMPv2

To enable SNMPv2 access on the Enterasys C2 Switches you have to issue following commands:


         set snmp access gReadOnlyV1V2C security-model v1 exact read vUnsecured
         set snmp access gReadOnlyV1V2C security-model v2c exact read vUnsecured
         set snmp community mycomunity securityname sn_v1v2c_ro
         set snmp group gReadOnlyV1V2C user sn_v1v2c_ro security-model v1
         set snmp group gReadWriteV1V2C user sn_v1v2c_rw security-model v1
         set snmp group gReadOnlyV1V2C user sn_v1v2c_ro security-model v2c
         set snmp group gReadWriteV1V2C user sn_v1v2c_rw security-model v2c
         set snmp view viewname vUnsecured subtree 1
         set snmp view viewname vUnsecured subtree 0.0

If you feel this helps a bit or may be not ? Please leave a comment.

Enterasys C2 and SSH

To enable the SSH Service on a Enterasys SecureStack C2 and similar you have to issue "set ssh enabled" on the cli.

         C2(su)->set ssh enabled
         SSH hostkey generation initiated. Process should complete in 60 seconds.
         C2(su)->


If you feel this helps a bit or may be not ? Please leave a comment.

Montag, August 16, 2010

Cisco ASA and SMTP

We recently bought so new Firewalls to replace to aged Cisco PIX515e with some new Gear. We decided to use Ciscos new Firewall flagship the Cisco ASA Devices. Everything was fine after the replacement, we transfered the configuration from the old boxes to the new with the help of the Cisco Security Manager.

Later that day there was complains about e-mails are not delivered properly.

On the Cisco PIX with Software 6.2 we had implemented following:

   
        no fixup smtp



For the ASA5510 we had to implement following

        policy-map type inspect esmtp esmtp_pmap
            parameters
              allow-tls action log
        policy-map global_policy
            class inspection_default
                no inspect esmtp
                inspect esmtp esmtp_pmap
            exit
        exit

If you feel this helps a bit or may be not ? Please leave a comment.

Freitag, August 13, 2010

Access-based Enumeration (ABE) and Cisco WAAS

Access-based Enumeration (ABE) is a smart feature to let users see only the folders they have access to.
But if you have Cisco WAAS deployed in your network please be aware you have to add a Dynamic share to the waas configuration so the waas knows about this.

Cisco Wide Area Application Services Configuration Guide (Software Version 4.1.7)

Step 1
For creating a dynamic share you have to add a Domain to the Cental Manager eg "Dynamic Shares"

Step 2
Create a entry under the dynamic shares in the global configuration.

On the WAE CLI

 
ToBe Done


If you feel this helps a bit or may be not ? Please leave a comment.

Cisco MDS 9222i with ACS

If you want to configure tacacs+ on the Cisoc MDS9222i Series you have to enable first the feature.

        feature tacacs+

After this the commands to configure the Tacacs+ are available.

        !
        feature tacacs+
        !
        tacacs+ distribute
        tacacs-server timeout 10
        tacacs-server host 10.0.243.247 key 0 secertkey
        tacacs-server host 10.0.243.248 key 0 secretkey
        tacacs+ commit
        !
        aaa group server tacacs+ AAA-Servers
            server 10.0.243.247
            server 10.0.243.248
            deadtime 5
        !
        aaa authentication login default group AAA-Servers
        aaa authentication login console local
        aaa authentication login error-enable
        !
        ip route 10.0.243.247 255.255.255.255 10.0.160.1 interface mgmt0
        ip route 10.0.243.248 255.255.255.255 10.0.160.1 interface mgmt0
        !
        interface mgmt0
            ip address 10.0.160.99 255.255.255.0
            switchport description Management
            switchport speed 100

If you feel this helps a bit or may be not ? Please leave a comment.

Samstag, Februar 14, 2009

We have 1234567890

We have 1234567890 regarding to Unix-Time:

$ date -d @1234567890
Sa 14. Feb 00:31:30 CET 2009

Sonntag, Februar 08, 2009

Wash me till i am clean

Belkin hat eine waschbare Maus heraus gebracht.
Na also da brauch ich mir keine Gedanken wegen meines Kaffeekonsums und meiner Maus zumachen, bleibt nur die Frage offen, ob man die Maus auch in den Trockner geben darf?

Montag, Januar 19, 2009

Ich wuste es doch meine Router sind Telephone

So So ich wuste es doch meine Router sind Telephone oder doch nicht. Nach dem wir auf unseren Zentralen DMVPN Routern das 12.4.15T7 IOS Release eingespielt hatten, sahen wir einen massiven Anstieg im Memory duch den CDP Process. Ein Debug der cdp events ergab folgende Log Meldungen:

Jan 19 12:12:51.513 UTC: CDP-EV: Lookup for ip phone with idb= Tunnel105 ip= a.b.x.y mac= 0000.0000.0000 platform= Cisco 1721
Jan 19 12:12:51.517 UTC: CDP-EV: Lookup for ip phone with idb= Tunnel105 ip= a.b.x.y mac= 0000.0000.0000 platform= Cisco 1812
Jan 19 12:12:52.141 UTC: CDP-EV: Lookup for ip phone with idb= Tunnel105 ip= a.b.x.y mac= 0000.0000.0000 platform= Cisco C836
Funny, mal sehen was das heist:-)

Donnerstag, Dezember 25, 2008

DynDNS mit einem Cisco Router

ip ddns update method dyndns
HTTP
add http://:@members.dyndns.org/nic/update?system=dyndns&hostname=>h<&myip=>a<
interval
maximum 1 0 0 0
!
interface Dialer 1
ip ddns update hostname haha.homelinux.org
ip ddns update dyndns

Donnerstag, Dezember 18, 2008

Recovery von einem System mit dd und smb

Wie bekommt man ein laufendes Windows System geklont?

Na das ist recht einfach man nehmen dd für Windows und erstelle auf einem FileServer ein Image der Platten.

dd if=\\?\Device\Harddisk3\Partition0 of=q:\img.dd bs=2M

Dann kann man dieses Image mit einer Ubuntu CD auf jeden anderen Rechner übertragen.


root@ubuntu:~# smbget -r -u <user> -p <passwd> -w <workgroup> smb://10.0.242.210/share/img.dd -O | dd of=/dev/sdb

Ubuntu Wiki DD
smbget

Edit:

Es hatte sich ein Fehler eingeschlichen, der Fehler bezieht sich auf eine Ubuntu 7.10 Distribution.
smbget gibt auf stdout folgende Zeilen am Anfang der Uebertragung aus:

read_socket_with_timeout: timeout read. read error = Connection reset by peer.
Receiving SMB: Server stopped responding

damit ist dann keine gueltige Partitionstabelle vorhaden und man kann mit der Festplatte nichts anfangen.
Vielleicht ist das in einer neueren Samba Version behoben.

Mittwoch, Dezember 17, 2008

IPTV mit T-Home

Um IPTV mit einem Cisco Router ans rennen zu bekommen muss ein igmp Proxy auf dem Cisco Configuriert werden. Die nachfolgende Konfiguration ist aus der Cisco Dokumention abgeleitet, es kann sein das noch die Timer angepasst werden müssen. Da ich selber keinen VDSL Zugang habe ist das noch einwenig Theorie.

--- snip ---
ip multicast-routing
ip igmp snooping
!
interface Vlan1
  ip pim sparse-dense-mode
  ip igmp helper-address udl Dialer 2
  ip igmp version 3
  ip igmp mroute-proxy Dialer 2
!
interface Dialer 2
  ip pim sparse-dense-mode
  ip igmp version 3
  ip igmp unidirectional-link
!
--- snip ---

Cisco Customizing IGMP

Bitte vergest nicht auch die Firewall regeln Anzupassen:

--- snip ---

ip access-list extended OUTSIDE

  9 permit ip any 224.0.0.0 15.255.255.255



--- snip --- 
Alternativ sollte auch folgende Konfiguration gehen.

--- snip ---

ip access-list extended OUTSIDE

  7 permit ip 217.0.119.0 0.0.0.255 224.0.0.0 15.255.255.255

  8 permit ip 193.158.35.0 0.0.0.255 224.0.0.0 15.255.255.255

--- snip ---
Zum Testen habe ich folgenden Aufbau gewählt: Als Telekom Router Cisco 1712
--- snip ---
ip multicast-routing
!
interface FastEthernet 0
  description to Customer
  ip address 192.168.2.2 255.255.255.0
  ip pim sparse-dense-mode
  
!
interface Ethernet 0
  description to IPTV Server
  ip address 192.168.4.1 255.255.255.0
  ip pim sparse-dense-mode
!
--- snip ---
Als Home Router Cisco 1812
--- snip ---
ip multicast-routing
ip igmp snooping
!
interface Vlan 1
  description IPTV Client
  ip address 192.168.200.1 255.255.255.0
  ip igmp helper-address udl Vlan 2
  ip igmp version 3
  ip igmp mroute-proxy Vlan 2
  ip pim sparse-dense-mode
!
interface Vlan 2
  description to Internet
  ip address 192.168.2.1 255.255.255.0
  ip igmp version 3
  ip pim sparse-dense-mode
  ip igmp version 3
  ip igmp unidirectional-link
!
--- snip ---
Als IP TV Server Apple Macbook 13' OS X 10.5.6 VLC 0.9.8 zum Starten des Streams hab ich den "Netzwerk Streaming Assistenten" verwendet. Die Stream Parameter sind "UDP Multicast", 239.0.0.42, TTL 10 und natürlich ein Video;-) Als Multicast Receiver diente ein IBM ThinkCenter R51 oder so mit Windows und VLC 0.9.8 installiert.

IP Multicast Routing

Unter IP Multicasting versteht man die Technik Daten, z.B. Video, an mehrer Teilnehmer zu verteilen.

IP Multicasting gibt es unter IPv4 und IPv6.

Einen Schnellen einstieg in die Configuration auf Cisco Routern bietet follgender Quick Start Guide. Weiterführend kann ich euch das Buch "Routing TCP/IP Volume II" empfehlen oder Cisco IOS IP Multicast Configuration Guide, Release 12.4.

Als Multicast Sender und Empfänger kann man VLC nehmen. Wir haben mit zwei 1700er Routern eine einfache Multicast Configuration auf gesetzt.

VideoLAN

Es gibt zwei Möglichkeiten VLC als Streaming Server einzusetzen, die erste Möglichkeit ist die Einrichtung über die Wizards, diese sind selbst erklärend, deshalb werde ich hier auf eine Beschreibung verzichten.

Streaming Server

Der vlc player kann auch über die CLI gesteuert werden. Hier ein einfaches Beispiel zum Starten eines Multicast Streams: vlc -vvv input.mpeg --sout udp:239.0.0.42 --ttl 12 Der Output der Logmeldungen mit "-v" eingrenzen.

Client

vlc udp:@239.0.0.42

Multicast HOWTO

Cisco Router Basic Multicast Configuration

--- snip ---
!
ip multicast-routing
!
! Startet das Multicast Routing
!
interface FastEthernet 0/0
  ip pim sparse-dense-mode
!
interface FastEthernet 0/1
  ip pim sparse-dense-mode
!
--- snip ---

Commands

show ip mroute

Ein anderer Blog Client

Ein anderer Blog Client für OS X ist "ecto".

Wie MarsEdit ist dieser auch Offline fähig.

Montag, Dezember 15, 2008

VDSL

Das Thema Cisco Router mit einem von den neuen VDSL Anschlüssen ans rennen zu bekommen ist nicht weiter schwierig. Hier ein paar Beispiele: Bei Routern die nur einen eingebauten Switch besitzen, z.B. Cisco 876:
--- snip ---
vlan 7
  name VDSL-VLAN
!
interface FastEthernet 8
  switchport mode trunk
  switchport trunk allowed vlan 1,7,1002-1005
!
interface Vlan 7
  description VLAN fuer VDSL
  no ip address
  pppoe enable group global
  pppoe-client dial-pool-number 1
!
interface Dialer 0
  ip address negotiated
  ip mtu 1452
  ip nat outside
  ip virtual-reassembly
  encapsulation ppp
  ip route-cache policy
  ip route-cache flow
  dialer pool 1
  dialer idle-timeout 0
  dialer persistent
  dialer-group 1
  ppp authentication chap pap callin
  ppp pap sent-username <user>@t-online.de password 0 <password> 
!
--- snip ---
Bei anderen Modellen kann man auch eines der Routing interface nehmen.
--- snip ---
interface FastEthernet 0.7
  encapsulation dot1q 7
  pppoe enable group global
  pppoe-client dial-pool-number 1
!
interface Dialer 0
  ip address negotiated
  ip mtu 1452
  ip nat outside
  ip virtual-reassembly
  encapsulation ppp
  ip route-cache policy
  ip route-cache flow
  dialer pool 1
  dialer idle-timeout 0
  dialer persistent
  dialer-group 1
  ppp authentication chap pap callin
  ppp pap sent-username <user>@t-online.de password 0 <password> 
!
--- snip ---

Mail nur über den 2en Internet Service Provider

Um mit den Cisco Routen Mail nur über einen Provider zu versenden, muss eine Policy Route erstellt werden die den Verkehr erstellt werden.
--- snip ---
ip access-list extended SERVER-RT-MAP-ACL
  10 permit tcp host 192.168.20.1 any eq smtp
!
route-map SERVER-RT-MAP permit 10
  match ip address SERVER-RT-MAP-ACL
  set interface Dialer1
!
interface FastEthernet 0
  ip policy route-map SERVER-RT-MAP 
--- snip ---

Sonntag, Dezember 14, 2008

Blog Client für OS X

Da ich zur Zeit bei mir zu Hause keinen Interzugang mit Flatrate habe sondern nur über einen Vodafone UMTS zugang über das Nokia N95 verfühge. Sind meine Online Zeiten auf ca. 200 MB im Monat beschränkt. Deshalb hab ich mich auf die Suche nach einem Offline fähigen Blogger Client begeben und bin auf MarsEdit gestossen, diesen kann man für 30 Tage testen, mal sehen wie er ist. Die zusammen arbeit mit Blogger.com schein ohne Probleme zu gehen. Fehlt jetzt nur noch ein Client für das Nokia N95 mit ähnlichen Funktionen.

Freitag, Dezember 12, 2008

NAT mit zwei Internet Providern

Eine subere Verbindung ins Internet mit Zwei Providern zu bekommen ist nicht so einfach mit folgender Configuration zu lösen.

Nicht funtionierende Lösung

--- snip ---
interface FastEthernet 0
  description LAN
  ip address 192.168.20.1 255.255.255.0
  ip nat inside
!
interface Dialer 1
  description Provider 1
  ip nat outside
!
interface Dialer 2
  description Provider 2
  ip nat outside
!
access-list 1 permit 192.168.20.0 0.0.0.255
access-list 2 permit 192.168.20.0 0.0.0.255
!
ip nat inside source list 1 interface Dialer 1 overload
ip nat inside source list 2 interface Dialer 2 overload
!
ip route 0.0.0.0 0.0.0.0 Dialer 1
ip route 0.0.0.0 0.0.0.0 Dialer 2
--- snip ---</pre>

Hier bei kommt es dann zu lustigen Effekten mit den Source Addressen. 
Bzw. durch Packet basiertes Load Balancing kann es sein das nichts Funktioniert oder man im besten Fall nur den Upload verbessert hat.

Die von uns geforterte Configuration benötigte noch das Goodie das ausgehende E-Mails nur über den zweiten Provider zu versenden sind. Da hinter dem Router ein Mail Server mit eigener Domain betrieben wird. 
Dazu aber in einem anderen Posting mehr. 

<h3>Die Lösung könnte folgendermaßen aussehen:</h3>

<pre>--- snip ---
interface FastEthernet 0
  description LAN
  ip address 192.168.20.1 255.255.255.0
  ip nat inside
!
interface Dialer 1
  description Provider 1
  ip nat outside
!
interface Dialer 2
  description Provider 2
  ip nat outside
!
access-list 1 permit 192.168.20.0 0.0.0.255
!
! Die ACL definiert den Verkehr der durch den NAT Process geschickt wird. 
!
route−map dialer1−nat permit 10
match ip address 1
match interface Dialer1
!
route−map dialer2−nat permit 10
match ip address 1
match interface Dialer 2
!
! Die Route-Maps binden die NAT Acl an das ISP Seitige Interface des Routers.
! 
ip nat inside source route−map dialer1−nat interface Dialer1 overload
ip nat inside source route−map dialer2−nat interface Dialer2 overload
!
!
!
ip route 0.0.0.0 0.0.0.0 Dialer 1
ip route 0.0.0.0 0.0.0.0 Dialer 2
!
--- snip ---

Überprüfung

  • show ip nat translation Zeigt die aktuellen NAT Sessions an.
  • show ip route Zeigt die Aktiven Routen an.
  • Weiter gehende Informationen findet ihr unter folgendem Link: Cisco IOS NAT Load-Balancing and Zone-Based Policy Firewall with Optimized Edge Routing For Two Internet Connections

    Montag, Dezember 08, 2008

    Serial Console unter Debian

    http://www.howtoforge.com/setting_up_a_serial_console Edit: /boot/grub/menu.lst
    --- snip ---
    # password topsecret
    serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
    terminal --timeout=10 serial console
    --- snip ---
    
    --- snip ---
    title           Ubuntu 8.10, kernel 2.6.27-7-server
    uuid            b25570ad-6302-4637-a897-d7a4cebf4a7f
    kernel          /boot/vmlinuz-2.6.27-7-server root=UUID=b25570ad-6302-4637-a897-d7a4cebf4a7f ro quiet splash console=tty0 console=ttyS0,34800n8
    initrd          /boot/initrd.img-2.6.27-7-server
    --- snip ---
    
    Edit: /etc/event.d/ttyS0
    --- snip ---
    # ttyS0 - getty
    #
    # This service maintains a getty on tty1 from the point the system is
    # started until it is shut down again.
    
    start on stopped rc2
    start on stopped rc3
    start on stopped rc4
    start on stopped rc5
    
    stop on runlevel 0
    stop on runlevel 1
    stop on runlevel 6
    
    respawn
    exec /sbin/getty -L ttyS0 38400 vt100
    --- snip ----
    
    Damit hätten wir dann eine Serielle Console auf der WAVE:-)
    WAVE-274#virtual-blade 1 session
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    
    Boot from (hd0,0) ext3   b25570ad-6302-4637-a897-d7a4cebf4a7f
    Starting up ...
    Loading, please wait...
    Couldnt get a file descriptor referring to the console
    19+0 records in
    19+0 records out
    kinit: name_to_dev_t(/dev/sda5) = dev(8,5)
    kinit: trying to resume from /dev/sda5
    
    --- output omited ---
    
    Ubuntu 8.10 ubuntu ttyS0
    
    ubuntu login: admin
    Password:
    Last login: Mon Dec  8 13:34:36 CET 2008 on ttyS0
    Linux ubuntu 2.6.27-7-server #1 SMP Fri Oct 24 07:37:55 UTC 2008 i686
    
    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
    applicable law.
    
    To access official Ubuntu documentation, please visit:
    http://help.ubuntu.com/
    
    System information as of Mon Dec  8 13:40:01 CET 2008
    
    System load: 0.02             Memory usage: 5%   Processes:       46
    Usage of /:  5.8% of 9.38GB   Swap usage:   0%   Users logged in: 0
    
    Graph this data and manage this system at https://landscape.canonical.com/
    
    admin@ubuntu:~$
    
    So dann nur noch ein Backup und dann go baby go.
    
    admin@ubuntu:~$ sudo su -
    root@ubuntu:~# halt
    
    Broadcast message from admin@ubuntu
          (/dev/ttyS0) at 13:43 ...
    
    The system is going  * Saving the system clock
    * Stopping firewall: ufw...                                             [ OK ]
    * Asking all remaining processes to terminate...                        [ OK ]
    * All processes ended within 2 seconds....                              [ OK ]
    * Deconfiguring network interfaces...                                   [ OK ]
    * Deactivating swap...                                                  [ OK ]
    * Unmounting local filesystems...                                       [ OK ]
    * Will now halt
    halt: Unable to iterate IDE devices: No such file or directory
    [  522.482593] Power down.
    Connection closed by foreign host.
    
    WAVE-274#copy virtual-blade 1 disk 1 ftp 192.168.200.5 / WAVE-274-LX.vb
    Enter username for remote ftp server: ftp
    Enter password for remote ftp server:
    
    2460112690 bytes total
    WAVE-274#