Showing posts with label config. Show all posts
Showing posts with label config. Show all posts

Monday, May 13, 2013

DD-WRT OpenVPN Daemon Settings


http://pantestmb.blogspot.ro/2013/04/dd-wrt-openvpn-router-to-router.html
http://pantestmb.blogspot.ro/2013/04/setup-openvpn-client-to-connect-to-dd.html

Services

VPN
OpenVPN Daemon
OpenVPN Config : 

# Servers LAN route 

## Push route to server subnet onto all clients
push "route 192.168.61.0 255.255.255.0"
#
## Clients LAN route 
route 192.168.101.0 255.255.255.0 172.16.0.2
route 192.168.33.0 255.255.255.0 172.16.0.2
route 192.168.62.0 255.255.255.0 172.16.0.2
route 192.168.15.0 255.255.255.0 172.16.0.2
#
## Bug workaround, this is fixed in r17685
client-config-dir /tmp/openvpn/ccd
#
server 172.16.0.0 255.255.0.0
dev tun0
proto tcp
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
management localhost 5001






Administration
Commands
Startup


mkdir -p /tmp/openvpn/ccd
echo "iroute 192.168.15.0 255.255.255.0" > /tmp/openvpn/ccd/bac15cli4res
echo "iroute 192.168.33.0 255.255.255.0" > /tmp/openvpn/ccd/dev03cli4res
echo "iroute 192.168.62.0 255.255.255.0" > /tmp/openvpn/ccd/buc06cli4res

Firewall


iptables -I INPUT -p tcp --dport 1194 -j ACCEPT
iptables -I INPUT -p tcp --source 192.168.61.0/24 -j ACCEPT
iptables -I INPUT -p tcp --source 192.168.101.0/24 -j ACCEPT
iptables -I INPUT -p tcp --source 172.16.0.0/16 -j ACCEPT
iptables -I INPUT -i tun0 -p icmp -j ACCEPT
iptables -I FORWARD --source 172.16.0.0/16 -p icmp -j ACCEPT
iptables -I FORWARD --source 192.168.15.0/24 -p icmp -j ACCEPT
iptables -I FORWARD --source 192.168.61.0/24 -p icmp -j ACCEPT
iptables -I FORWARD --source 192.168.62.0/24 -p icmp -j ACCEPT
iptables -I FORWARD --source 192.168.101.0/24 -p icmp -j ACCEPT
iptables -I FORWARD -p tcp --source 172.16.0.0/16 -j ACCEPT
iptables -I FORWARD -p tcp --source 192.168.101.0/24 -j ACCEPT
iptables -I FORWARD -p tcp --source 192.168.61.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT



If there is a gateway server - a routing command can be used :
route add -net 192.168.15.0 netmask 255.255.255.0 gw 192.168.16.49

Monday, October 31, 2011

SUSE : Eclipse INDIGO Subversion - Google.Code


http://pantestmb.blogspot.com/2011/08/eclipse-subversion-subversive.html












SUSE : Eclipse Indigo - Android Development Plugin


http://pantestmb.blogspot.com/2011/08/eclipse-indigo-with-android-development.html



  1. Start Eclipse, then select Help > Install New Software....
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/
  4. Click OK Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish. Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
  8. When the installation completes, restart Eclipse.












Friday, October 28, 2011

Registering ASP.NET on IIS

Registering ASP.NET on IIS after installing the .NET Framework




aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and should be called with the -i parameter: aspnet_regiis.exe -i








run aspnet_regiis.exe -i in VS 2010 command prompt.
http://pantestmb.blogspot.com/2011/10/svc-integrated-bad-module.html

Sunday, October 16, 2011

svc-Integrated bad module ManagedPipelineHandler


HTTP Error 500.21 - Internal Server Error

Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list






Solution : 
run aspnet_regiis.exe -i in VS 2010 command prompt.



Visual Studio 2010 -> Tools -> command prompt :



Thursday, September 29, 2011

Calling a RESTful Service Using Fiddler


Creating RESTful Services Using WCF


https://docs.google.com/document/pub?id=1T4oQneluGK-6y_-v5_hO5sxw-RenSXgtqUfYve11bdA
http://channel9.msdn.com/blogs/pdc2008/tl35 - WCF: Developing RESTful Services


Create a Console App, add references for : 
System.ServiceModel, 
System.Runtime.Serialization, 
System.ServiceModel.Web
                                                             and hit F5 in Visual Studio. 




System.ServiceModel.Web - if there is reference problem : 

In "project properties" make sure your "target framework" is set to : .NET Framework 4
and not: .NET Framework 4 Client Profile, or any lower .NET version.






FIDDLER , Request Builder , Execute : 
POST         http://127.0.0.1:8000/customers         HTTP/1.1





























a) GET & POST  : 

b) C# console : 

c) SQL Server +  Android client : 


APPLICATION POOL : 



http://dotnetninja.wordpress.com/2008/05/02/rest-service-with-wcf-and-json/
http://www.dotnetspark.com/kb/1373-step-by-step-tutorial-rest-enabled-service.aspx


Web.Config : 





REST Based WCF Service in ASP.NET 3.5


Friday, August 26, 2011

SQUID - The requested URL could not be retrieved

Error from squid is that it can not retrieve the url "/",
but the browser's url is http://google.com

ERROR

The requested URL could not be retrieved


The following error was encountered while trying to retrieve the URL: /
Invalid URL
Some aspect of the requested URL is incorrect.
Some possible problems are:
  • Missing or incorrect access protocol (should be http:// or similar)
  • Missing hostname
  • Illegal double-escape in the URL-Path
  • Illegal character in hostname; underscores are not allowed.
Your cache administrator is .





  
the fix :
in squid.conf :
http_port 3128 transparent



Saturday, August 13, 2011

Ubuntu kdm gdm lxdm

I have installed Kubuntu-desktop and Lubuntu-desktop on top of Ubuntu
If I want to switch from gdm to kdm or lxdm :
In a terminal window one of the following commands can be used :

sudo dpkg-reconfigure gdm
sudo dpkg-reconfigure kdm
sudo dpkg-reconfigure lxdm




 

How to Switch Between GDM and KDM on Ubuntu

Friday, August 5, 2011

Eclipse Indigo with Android Development Plugin

Eclipse Indigo with Android Development Tools ADT Plugin

Step 1 :

Download and install the Android SDK


Step 2 : 

 Downloading the ADT Plugin

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.<>
Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.
  1. Start Eclipse, then select Help > Install New Software....
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/
  4. Click OK Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish. Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
  8. When the installation completes, restart Eclipse.
























Thursday, April 21, 2011

GRUB2 DEFAULT

Ubuntu grub.cfg

Editing /etc/default/grub

You can open /etc/default/grub file with the following command,


gksudo gedit /etc/default/grub
or
gksudo kate /etc/default/grub

This is what it should look like,
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.



GRUB_DEFAULT=0
The number at the end of this line can be changed to make the highlight bar or selection bar in the GRUB Menu appear automatically on any GRUB Menu entry we like.
0 (zero) tells GRUB we want the first or top GRUB entry automatically selected unless we over ride that selection with our up or down arrow key during boot-up.
Any number greater than 0 (zero) will mean boot entries further down the GRUB Menu will be selected instead.

Alternatively, replace the number here with the word 'saved' to enable the grub-set-default command to work.