CISCO DHCP IP routes option 249 / 121 configurator / generator / script

If You need to add option 249 to Your cisco dhcp, and need to announce network with mask bigger tnah /24 ( fg. /16 /8 ) use this script:

#!/usr/bin/perl -w
 use strict;
 sub option_121 {
 my $gw = shift;
 my $out_str = '';
 my ($subnet, $mask, $b0, $b1, $b2, $b3);
 foreach my $cidr (@_) {
 ($subnet, $mask) = split('/', $cidr);
 ($b0, $b1, $b2, $b3) = split(/\./,$subnet);
 $out_str .= sprintf('%02x', $mask);
 $out_str .= sprintf('%02x', $b0);
 $out_str .= sprintf('%02x', $b1) if($mask > 8);
 $out_str .= sprintf('%02x', $b2)
 if($mask > 16);
 $out_str .= sprintf('%02x', $b3) if($mask > 24);
 $out_str .= sprintf('%02x%02x%02x%02x', split(/\./,$gw));
 }
 return $out_str;
 }
 if(@ARGV < 2)
 {
 print "Usage: $0 GW-IP Subnet1/Mask1 Subnet2/Mask2 ... SubnetXX/maskXX\n";
 }
 elsif($ARGV[0] =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
 {
 print "DHCP option 249 hex string: ".option_121(@ARGV)."\n";
 }
 
Usage: 
./routes-to-hex.pl 172.22.1.1 172.20.1.0/24 172.20.2.0/24 172.21.0.0/16
 DHCP option 249 hex string: 18ac1401ac16010118ac1402ac16010110ac15ac160101

At router:

ip dhcp pool PPTP
network 172.22.1.0 255.255.255.0
domain-name domain.com.pl
dns-server 172.20.1.3 172.20.1.6
option 249 hex 18ac.1401.ac16.0101.18ac.1402.ac16.0101.10ac.15ac.1601.01
default-router 172.22.1.1

Done! 🙂

FileZilla – Tryb Informacyjny / Information mode

W programie Filezilla podczas próby ustawienia konta w trybie: Normalne
pojawia się komunikat:

—————————
Menadżer Stron – Błędne dane
—————————
FileZilla jest uruchomiona w trybie informacyjnym.
Typy logowania 'Normalny’ i 'Konto’ nie są dostępne w tym trybie.
—————————
OK
—————————

Solution:
Należy wejść do: Edytuj -> Ustawienia -> Interfejs -> odznacz: Nie zapisuj haseł

Done!

[Synology] [Windows 7] The network path was not found

Problem:
Connection from computer launched by WDS is dropped after connect to samba / nas / synology serwer.

Cause:
The problem is that within our environment, by default, Windows 7 required all SMB packets to be signed. Samba servers, however, do not. So there are two ways to fix this: turn off client signing in Win7 or add a flag to the smb.conf file in the global section as this: ’server signing = auto’. (we were using Samba 3.5.2).

For Windows 7, you can 'fix’ this policy by making it more lenient — going from requiring digital signatures to optionally using it if the server agrees.

Solution:
The local windows security policy changes are as follows: Start menu type GPEdit.msc Browse to Computer Configuration->Windows Settings->Security Settings->Local Policies->Security Options Look for „Microsoft network client: Digitally sign communications (always)” and change it to Disabled

You may also need to do the same for „Microsoft network client: Digitally sign communications (if server agrees)”. In theory this should be negotiated during the negotiate/challenge phase of NTLM but it may fail; NTLM doesn’t explicitly demand any real negotiation.

Source: http://serverfault.com/questions/261023/windows-7-client-attached-to-a-domain-connecting-to-a-samba-3-5-2-server

Windows 2008 R2 NAP RADIUS Ignore dial in settings

If you have problem with CISCO PPTP VPN and RADIUS Windows 2008 R2, If access permission is ignored, even if „Ignore user account dial-in” checked.

Authentication Details:
Connection Request Policy Name:    Use Windows authentication for all users
Network Policy Name:        Connections to other access servers
Authentication Provider:        Windows
Authentication Server:        xxx
Authentication Type:        MS-CHAPv2
EAP Type:            –
Account Session Identifier:        –
Logging Results:            Accounting information was written to the local log file.
Reason Code:            65
Reason:                The Network Access Permission setting in the dial-in properties of the user account in Active Directory is set to Deny access to the user. To change the Network Access Permission setting to either Allow access or Control access through NPS Network Policy, obtain the properties of the user account in Active Directory Users and Computers, click the Dial-in tab, and change Network Access Permission.

Solution:
Go to:
RADIUS Clients – note friendly name ( fg. cisco-1 )
Next goto:

Network Policies -> Your Policy Name ->
State: enable
Grant access
Ignore user account dial-in properties
Type of network access server: Unspecified (!!!)
Next tab: Conditions
Set: User Groups ( YourGroup )
Set: Client friendly name: ( fg. cisco-1 )

It’s important to have the same friendly name, and server type ( not VPN Dial in )

Good luck!

Draytek SSH problem linux debian ubuntu

If you try to connect to your draytek ( for instance vigor 2820 ) and You received error:

debug1: expecting SSH2_MSG_KEXDH_REPLY

It mean, that draytek cant support Your KexAlgorithms.

Simple use this way:

ssh -o KexAlgorithms=diffie-hellman-group1-sha1 admin@example.com

QuickStart how to update / upgrade Vsphere ESX [5.0 -> 5.1] [5.1 -> 5.5] [ U1 -> U2 ] from console in OVH

ESX 5.5 U1 to 5.5 U2 )

1) Download: update-from-esxi5.5-5.5_update02-2068190.zip

2) Upload to ESX

3) Run:

esxcli software profile update -d /vmfs/volumes/DS1/update-from-esxi5.5-5.5_update02-2068190.zip -p ESXi-5.5.0-20140902001-standard

ESX 5.5 to 5.5.1 ( or 5.5 U1 )

1) Download: update-from-esxi5.5-5.5_update01.zip

2) Upload to ESX

3) Run:

esxcli software vib install -d /vmfs/volumes/W-DS01/update-from-esxi5.5-5.5_update01.zip --dry-run

ESX 5.1 to 5.5

1) download „depot” from vmware site.

  • VMware-ESXi-5.5.0-1331820-depot.zip
  • update-from-esxi5.1-5.1_update01.zip

2)

esxcli software sources profile list -d /vmfs/volumes/VMB-DS1/VMware-ESXi-5.5.0-1331820-depot.zip

esxcli software profile validate -d /vmfs/volumes/VMB-DS1/VMware-ESXi-5.5.0-1331820-depot.zip -p ESXi-5.5.0-1331820-standard

Reboot.

Other way:

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-133
1820-standard

ESX 5.0 to 5.1

1) download „depot” from vmware site.
( VMware-ESXi-5.1.0-799733-depot.zip / update-from-esxi5.1-5.1_update01.zip )
2) upload it to datastore
3) at ssh (full patch is required ) type:

esxcli software profile update -d /vmfs/volumes/VMB-DS1/VMware-ESXi-5.1.0-799733-depot.zip  -p ESXi-5.1.0-799733-standard

reboot, and:

esxcli software vib install -d /vmfs/volumes/VMB-DS1/update-from-esxi5.1-5.1_update01.zip

Windows 7 automatic uninstall script

Get Uids:
start -> run -> cmd: wmic
wmic:root\cli> product get name,IdentifyingNumber

Result:
wmic:root\cli>product get name,IdentifyingNumber
IdentifyingNumber Name
{95140000-0070-0000-0000-0000000FF1CE} Microsoft Office 2010
{1D8E6291-B0D5-35EC-8441-6616F567A0F7} Microsoft Visual C++ 2010 x64
{09536BA1-E498-4CC3-B834-D884A67D7E34} IntelR Trusted Connect Service
{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} Microsoft Visual C++ 2010 x86
{6FE8E073-D159-4419-93E2-CE2C5B078562} HP ProtectTools Security Manage
{16793295-2366-40F7-A045-A3E42A81365E} Bing Bar
{6F44AF95-3CDE-4513-AD3F-6D45F17BF324} HP Support Assistant

Create script.bat:
MsiExec.exe /qb /passive /X{95140000-0070-0000-0000-0000000FF1CE}
MsiExec.exe /qb /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}
MsiExec.exe /qb /passive /X{6E3610B2-430D-4EB0-81E3-2B57E8B9DE8D}
MsiExec.exe /qb /passive /X{CD95F661-A5C4-44F5-A6AA-ECDD91C240CF}
MsiExec.exe /qb /passive /X{CA2F6FAD-D8CD-42C1-B04D-6E5B1B1CFDCC}

Volea!