Showing posts with label ip. Show all posts
Showing posts with label ip. Show all posts

Tuesday, September 12, 2017

Unable to fetch Ubuntu Archives 404 Not found IP 91 189 92 201 80

Unable to fetch Ubuntu Archives 404 Not found IP 91 189 92 201 80


If you are unable to fetch  archives in Ubuntu, there may be few of the reasons:

  1. Either your dns lookup failed,
  2. Or your archives lookup address got changed.
I will highlight both of the possibilities and represent you the solutions.

If your dns lookup failed, you can follow the below steps:
  • First, take the backup of the /etc/resolv.conf file by running the following command

  • Add the following entries in the original /etc/resolv.conf file

  • Save the file and restart the network using the following command

  • It may be possible that your ubuntu gets hanged as happened to mine.There is no need to panic, you can run the following command to get your system working



Or, your archive address got changed ( 404 Not Found [IP: 91.189.92.201 80] )

Again if you are getting the same error while fetching archives, then that means your archive has changed.
And the best way to determine is check whether you are getting the following error


If this is the case follow the steps below:

  • First take the backup of the /etc/apt/sources.list by running the following command

  • Change the name from the archive.ubuntu.com to old-releases.ubuntu.com

Thats it.. .Definitely your update will work now .... 

download file now

Read more »

Sunday, September 3, 2017

Ubuntu 14 04 Server Static IP

Ubuntu 14 04 Server Static IP


By default, Ubuntu 14.04 server sets the network interface using DHCP. In most cases this is eth0, but could vary. To set that interface using a static IP address, the interfaces file needs to be edited. At the console type the command in bold to open the nano editor. (Replace nano with your editor of choice). For this exercise we are going to give the server a static IP of 10.0.1.5 in a 24-bit network.

user@server:/# nano  /etc/network/interfaces

Find this line:
iface eth0 inet dhcp

and change dhcp to static, then append the following lines after:
address 10.0.1.5
netmask 255.255.255.0
network 10.0.1.0
broadcast 10.0.1.255
gateway 10.0.1.1
dns-nameservers 10.0.1.2

The last line can be replaced with a public DNS server such as Google, or OpenDNS.  In this, I chose my private DNS server running a simple Bind9 instance in my network. The interfaces file can be saved and exited. Next the nameservers need to be added to the resolv.conf file located at /etc/resolv.conf

user@server:/# nano  /etc/resolv.conf

Add the nameservers of your choice, public or private, or a combination of both, as well as a search domain if you have one, or you can make up one.

nameserver 10.0.1.2
nameserver 10.0.1.3
search network.domain

Save the file and exit. The last step is to add the server name to the hosts file.

user@server:/# nano  /etc/hosts

10.0.1.5    ubuntu-srv.network.domain    ubuntu-srv

Save and exit. The final step is to restart the network service for the server to get the new IP address.

user@server:/# sudo ifdown eth0 && sudo ifup eth0

Thats all, from another computer on the local network you should be able to ping the servers static IP address if all went well and there were no errors.

download file now

Read more »

Saturday, September 2, 2017

UES 357 Using IP address or domain name to access UES gadgets

UES 357 Using IP address or domain name to access UES gadgets


You may get the following error and your gadgets wont work as expected if you try to use an IP address/domain name instead of the default URL with https.

Eg :-

Default :
https://localhost:9443/portal/gadgets/intro-gadget-2/intro-gadget-2.xml

Updated :
https://10.100.0.128:9443/portal/gadgets/intro-gadget-2/intro-gadget-2.xml
or
https://ues.udara.me/portal/gadgets/intro-gadget-2/intro-gadget-2.xml
Detailed error: 500 javax.net.ssl.SSLException: hostname in certificate didnt match: <10.100.1.128> != <localhost> shindig.js:9
By default all WSO2 products shipped with a self signed certificate for the domain localhost, to overcome this issue you have to create and add a certificate for your IP/Domain name.
 1. Lets assume you need to add a self signed certificate for your IP address(10.100.0.128), run following command and provide information when required, here Im using wso2carbon as my keystore password so I dont have to do any configuration changes.

keytool -genkey -alias ues -keyalg RSA -keystore  ues.jks -keysize 2048

Note :- I have created ues.jks within /home/udara/key/ directory and you have to provide your IP or domain name as your first and last name (CN).
udara@thinkPad:~/key$ keytool -genkey -alias ues -keyalg RSA -keystore  ues.jks -keysize 2048
Enter keystore password: wso2carbon
Re-enter new password: wso2carbon
What is your first and last name?
  [Unknown]:  10.100.0.128
What is the name of your organizational unit?
  [Unknown]: 
What is the name of your organization?
  [Unknown]:  WSO2
What is the name of your City or Locality?
  [Unknown]:  Mountain View
What is the name of your State or Province?
  [Unknown]:  CA
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=10.100.0.128, OU=Unknown, O=WSO2, L=Mountain View, ST=CA, C=US correct?
  [no]:  yes

Enter key password for <wso2carbon>
    (RETURN if same as keystore password):  wso2carbon
Re-enter new password: wso2carbon

2.Take a back-up of the current <UES_HOME>/repository/resources/security/ directory.

3.Run following command within <UES_HOME>/repository/resources/security/ directory to import your certificate into wso2carbon.jks.

Since I have created my ues.jks inside /home/udara/key/ directory in step-1,
udara@thinkPad:/wso2/support/workspace/wso2ues-1.0.0/repository/resources/security$ keytool -importkeystore -srckeystore /home/udara/key/ues.jks -destkeystore wso2carbon.jks -srcstoretype jks -deststoretype jks -srcstorepass wso2carbon -deststorepass wso2carbon
Entry for alias ues successfully imported.
Import command completed:  1 entries successfully imported, 0 entries failed or cancelled
4. Since we cant have two different private keys, lets delete the previous one.
udara@thinkPad:/wso2/support/workspace/wso2ues-1.0.0/repository/resources/security$ keytool -delete -alias wso2carbon -keystore wso2carbon.jks -storepass wso2carbon
5.  Lets export our public key from wso2carbon.jks and import it in to the client-truststore.jks.

I) Export public key from wso2carbon.jks as test.cer.
udara@thinkPad:/wso2/support/workspace/wso2ues-1.0.0/repository/resources/security$ keytool -export -keystore ues.jks -alias ues -file test.cer
Enter keystore password: 
Certificate stored in file <test.cer>
II) Import public certificate test.cer into client-truststore.jks.
udara@thinkPad:/wso2/support/workspace/wso2ues-1.0.0/repository/resources/security$ keytool -import -alias ues -file test.cer -keystore client-truststore.jks
Enter keystore password: 
Owner: CN=10.100.0.128, OU=Unknown, O=WSO2, L=Mountain View, ST=CA, C=US
Issuer: CN=10.100.0.128, OU=Unknown, O=WSO2, L=Mountain View, ST=CA, C=US
Serial number: 4a460fad
Valid from: Tue Apr 08 11:49:26 IST 2014 until: Mon Jul 07 11:49:26 IST 2014
Certificate fingerprints:
     MD5:  54:CD:B8:CD:7D:3D:B5:29:2B:A4:45:61:18:C9:5A:59
     SHA1: 53:03:B5:6D:32:D2:07:33:0D:49:7A:37:32:C7:13:DA:4E:29:60:28
     SHA256: C5:23:6D:09:F3:97:45:3A:F8:19:A1:F9:14:18:DE:BC:F3:C7:C9:C1:FF:0E:D9:E6:94:EF:DA:A3:6D:79:36:B9
     Signature algorithm name: SHA256withRSA
     Version: 3

Extensions:

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 92 70 EA 1B 80 6B F8 07   84 0A D9 B0 FE 52 A3 41  .p...k.......R.A
0010: C0 DA B0 17                                        ....
]
]

Trust this certificate? [no]:  yes
Certificate was added to keystore
6. Since we have updated the key store alias from wso2carbon to ues, we have to modify this in few configs to make SSO works.

Update <UES_HOME>repository/conf/carbon.xml,
<KeyStore>
            <!-- Keystore file location-->
            <Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
            <!-- Keystore type (JKS/PKCS12 etc.)-->
            <Type>JKS</Type>
            <!-- Keystore password-->
            <Password>wso2carbon</Password>
            <!-- Private Key alias-->
            <KeyAlias>ues</KeyAlias>
            <!-- Private Key password-->
            <KeyPassword>wso2carbon</KeyPassword>
 </KeyStore>
If we take portal jaggery app(<UES_HOME>/repository/deployment/server/jaggeryapps/portal),

Update ssoConfiguration section in portal.json as follows,
    "ssoConfiguration" : {
        "enabled" : true,
        "issuer" : "portal",
        "identityProviderURL" : "%https.host%/sso/samlsso.jag",
        "keyStorePassword" : "wso2carbon",
        "identityAlias" : "ues",
        "responseSigningEnabled" : "true",
        "keyStoreName" : "/repository/resources/security/wso2carbon.jks",
        "storeAcs" : "%https.host%/store/sso.jag",
        "portalAcs" : "%https.host%/portal/sso.jag",
        "appAcsHost" : "%https.host%"
    }
You have to made the above update in all other jaggery apps within the  <UES_HOME>/repository/deployment/server/jaggeryapps/ directory.

Update ssoConfiguration section in portal/dashboard-template/files/login.jag.hbs, but in the lastest UES distribution you have to make this change within portal/dashboard-template/files/config.json.hbs.
        ssoConfiguration = {
            "enabled": true,
            "issuer": "{{appName}}",
            "identityProviderURL": config.ssoConfiguration.identityProviderURL,
            "keyStorePassword": "wso2carbon",
            "identityAlias": "ues",
            "responseSigningEnabled": "true",
            "keyStoreName": "/repository/resources/security/wso2carbon.jks"
        }

7. Restart WSO2 UES server.

If you browse Home>Configure>Key Stores>View Key Store, you can see the certificate of the private key section as follows.


By providing your IP address or domain name as the first and last name in step 1, you can overcome this host-name mismatch issue while loading UES gadgets.

You can refer this article[1] which explains how to create and add CA signed certificate to any Carbon product.

[1] . http://wso2.com/library/knowledge-base/2011/08/adding-ca-certificate-authority-signed-certificate-wso2-products/

download file now

Read more »

Thursday, August 10, 2017

Tutorial How to make an IP logger To get others IP Detailed

Tutorial How to make an IP logger To get others IP Detailed



An IP-address (Internet Protocol) is a specific, unique number given to each computer, this is used to communicate with other computer devices.
There are right now, two different kind of IP-addresses, the ipv4 (32-bit system) and ipv6 (128-bit system).
The first one was the ipv4 system, but because we were running out of IP-addresses, we needed a new system and then, the ipv6 was born.

Examples:
Ipv4 - 173.194.112.0
Ipv6 - 2a00:1450:4001:c02::8a:

But some people abuse this system to do harm to other people.


Well, to do this, we need multiple things:Basic knowledge about HTML, CSS, JavaScript, and PHP (No worry if you don’t know them).A webhost (000webhost.com)A domain name (dot.tk)A .txt file

Okay, it maybe seems like a LOT for you, and extremely hard – Well, it isn’t!
We only are making a simple button in HTML & CSS, an alert-box in JS, and the log-system in PHP. :)

I’ll explain every line, so don’t worry!

We’ll be making a simple web-page that gets the IP of the victim, and then saves it in a .txt file.


Okay, first we have to make the webpage, for this we need two languages, HTML and CSS.
I assume you already know these, if not, I highly recommend learning them. :)
http://codecademy.com can help you a lot further.
We only need the basics though.

First we need an editor (program to code in, Mostly used for Mark-up (HTML), Stylesheet (CSS), and scriping languages (JavaScript).
Notepad++ is a good free one, but if you dont have that one your normal Notepad is okay to.
Go here: http://notepad-plus-plus.org/download/ - Recommended; Download & Install
Or, if you want to do it fast and now, useWinkey + R > "Notepad".

Now, were ready to go!
The basic HTML tags:

Code:

<!DOCTYPE html>
<html>
<head>
<title></title>

</head>
<body>

</body>
</html>

So, let me explain all these things.
Every tag you open in the HTML language, must also be closed (most of the time).
<html> (open) </html> (close it "").
<!DOCTYPE html> - Our browsers must know were using the latest HTML version (HTML5)<head> - Here we place all our metadata and styling,...<title> - The text you see in your browser bar (Hack Forums)<body> - All the content (not necessary layout) is placed here

Peanuts isnt it? :)

Well, now lets go deeper in our HTML code, Ill use comments (<!-- TEXT -->) to show what Ive added this time. Comments wont be displayed on the webpage
because its ignored by browsers.

Code:

<!DOCTYPE html>
<html>
<head>
<!-- NEW! Ive set a title here, this will be displayed in the browser tab-->
<title>Give a damn • Now!</title>

</head>
<body>
<!--NEW! Ive added a division-->
<div>Give a damn</div>
</body>
</html>

Okay, So, Ive added a browser tab title, and adivision.
Let me explain that division.
A division means in HTML... Nothing!
You dont say anything with it.

But for what is it used then?
Just to wrap text together, or wrap other elements in your text together, or to only select a specific area on/in your page/code.

If you save it now as index.php (nothing else! It MUST be index.php (mention the .php extension),
and open it with your browser you will see the title in your browser tab + The text "Give a damn!".
Not much, isnt it?

It looks, so boring... Lets style it!
For styling we use the language CSS (Cascading StyleSheet), cascading because the structure of such a code, and StyleSheet because its to... Style. :D

Code:

<!DOCTYPE html>
<html>
<head>
<title>Give a damn • Now!</title>
<!-- NEW! Ive added <style>-->
<style>

</style>
</head>
<body>
<!--NEW! Ive added an ID in this division-->
<div id="button">Give a damn</div>
</body>
</html>

I again added two things.
Style, and an id.
In the <style> tags we are going to place our CSS codes.
Let me now explain what an ID is;

If you give an element in HTML an ID by adding id="anything" to it, you say that only that one element, no other, only that one must listen to what the CSS says.
That means that if CSS says: "EVERYTHING RED, NOW!" But id-anything says: "Please, become blue" The element including id-anything will turn blue.

In short: You can edit only one element with it. :P

If you want to give an element an id in HTML, you add id="text" to it, where text can be anything.
Example:

Code:

<p id="turnBlue"></p> - Paragraph has an ID called "turnBlue"
<div id="main"></div> - This division has an ID called "main", probably its the biggest div of all
<font id="specialFontFamily"></font> - This font has an ID called "specialFontFamily", probably the coder added a special font-family (Arial, Courier,...) to it.

But we may set as many unique IDs as we want, if there is no CSS, those IDs have no clue what to do! And we dont want to confuse our IDs, do we?

So we add it in our CSS, I pick out a piece of our long code, so its easier to explain etc.

Weve got a division with ID "button", in CSS we declare were picking out an ID from our HTML using the #-symbol.
Thatd give:

Code:

<!-- Remember our Style where we place all our CSS?-->
<style>
#button {

}
</style>

Lets say, we want to give it a yellow colour, with black coloured text which is in font-family Courier.
Thatd give:

Code:

<!-- Remember our Style where we place all our CSS?-->
<style>
#button {
background-color: #FFFF00;
width: 25%;
height: 15%;
font-family: Courier;
font-size: 250%;
text-align: Center;
position:absolute; top:40%; left:40%;
}
</style>

Let me explain everything about it!
- First we of course say were using an ID called "button" > #button, everything we style for that ID do we place in {} brackets.
- Background-color ~ Declare we want to set a specific background-color for our ID (division).
- With # ~ we dont only declare IDs, but also that were using HTML-colour-codes to say what colour to use, #FFFF00 gives yellow (you dont have to learn those
from outside >>http://html-color-codes.info<< well, you may learn those from outside, but eh...)
- Width and height ~ to set a specific width and height of our division.
- Font-family ~ to say we want to use a specific font family
- Font-size ~ To set a specific font size (250% = 2.5 times bigger as default [mostly 16px])
- text-align: Center ~ We want all our text in our div(ision) with id "button" is in the center (you can also place left and right)
- Position ~ We set our division box 40% away from the top, and 40% away from the left, so its perfectly in the middle of our browser screen.

So, now weve got a button, but on a white background? That doesnt look professional!
Lets make it blue!

We do that with the body element, the body (<body>) element goes over our whole webpage.
We do it like this:

Code:

<style>
/*NEW! We added the body to change (CSS has special comments [/*Comment Text*/])*/
body {
background-color:#0000FF;
}
#button {
background-color: #FFFF00;
width: 25%;
height: 15%;
font-family: Courier;
font-size: 250%;
text-align: Center;
position:absolute; top:40%; left:40%;
}
</style>

Because body isnt an ID, nor a class (.myClassName - Able to give to multiple elements) we use body directly in our CSS without a special icon.
And we make it blue (#FFFF00).
Lets place our style back in our HTML code.

No weve got a nice button! :)
It doesnt look much, but it isnt needed. The IP gets logged directly after a person visits it, we just style our webpage so it doesnt look suspicious. ;)

So, our full HTML & CSS code would be:

Spoiler (Click to View)


Now, lets move on to our next language called JavaScript, JavaScript is an extremely powerful scripting (just say programming) language on the web, and also exists
as long as the web does. We wont be using it that much now, but okay.

Were going to make a pop-up box, we do that with the alert() function, it looks like this:
alert("This Text will be displayed");
And

Quote:This Text will be displayed


will pop-up.

Well, Lets go!
To code in JavaScript, we have to include <script> tags.
<script>
//JS here
</script>

So, our code will look like this:

Code:

<!DOCTYPE html>
<html>
<head>
<title>Give a damn • Now!</title>
<style>
body {
background-color:#0000FF;
}
#button {
background-color: #FFFF00;
width: 25%;
height: 15%;
font-family: Courier;
font-size: 250%;
text-align: Center;
position:absolute; top:40%; left:40%;
}
</style>
<script>
alert("Thanks for giving a Damn!!!!!");
</script>
</head>
<body>
<div id="button">Give a damn</div>
</body>
</html>

No click on that give-a-damn button!
...
Yeah, it doesnt work.
We have to make it work by Clicking On the button, lets use onClick for that in our HTML!
To use onClick we need two things:A JS-functionA HTML element
Weve already got a HTML element (our DIV), but no JS-function.
I wont go to deep on this because you can write a whole book about functions.

Anyway, we use functions to say a piece of code to return something, that piece of code do we place between {} brackets while we defined our function.

Example:

Code:

<script>
function myFunctionName() {
//Piece of code to do something...
}
</script>

Now, we can trigger that function using onClick in our div. Like this:

Code:

<div id="button" onClick="myFunctionName()"></div>

So, your full code would be:

Spoiler (Click to Hide)

Code:

<!DOCTYPE html>
<html>
<head>
<title>Give a damn • Now!</title>
<style>
body {
background-color:#0000FF;
}
#button {
background-color: #FFFF00;
width: 25%;
height: 15%;
font-family: Courier;
font-size: 250%;
text-align: Center;
position:absolute; top:40%; left:40%;
}
</style>
<script>
function thx() {
alert("Thanks for giving a Damn!");
}
</script>
</head>
<body>
<div id="button" onClick="thx()">Give a damn</div>
</body>
</html>

Lets move on! :)


Now, weve got our HTML, CSS, and JS done!
Now we have to program our PHP.
PHP stands for Hypertext PreProcessor and is a server-side language, that means we cant test it while coding offline (except if you got an APACHE server downloaded). :)
But as soon as we upload it, you can.

Okay, the code we will be using is this one:

Code:

<?php
$ip = $_SERVER[REMOTE_ADDR]." ";
$logFile = logs.txt;
$fO = fopen(logs.txt , a);
fwrite($fO, $ip);
fclose($fO);
?>

You can place it anywhere, I recommend beneath the <HTML> tags. :)
The <script> for JS and the <style> for CSS is <?php ?> for PHP.

In PHP we declare variables using the $-symbol, we keep using that symbol if we want to use our variable for something.

So, Ive got a variable called IP with this as value:

Code:

//Just to get IP
$_SERVER[REMOTE_ADDR]

That is to get the IP, " " so the IPs get listened beneath each other and not side-by-side. :)

- $logFile is our variable which says what .txt file were going to use.
Make a .txt file called: logs.txt and just type: "--IP-addresses:--" [Press Enter]X2 in it.

- $fo variable together with the fopen function to open the file (fopen), we open the file logs.txt the a means that we only allow to write something in the file, but nothing else!
Not reading, not editing, only writing. :)

- And then the most important, the fwrite function, we write the value of $ip and $ date in logs.txt with the permission a.

- And as last we close it (fclose).

Not that hard, is it? :)

So, our full, full, code will be:

Spoiler (Click to Hide)

Code:

<!DOCTYPE html>
<html>
<head>
<title>Give a Damn - Now!</title>
<style>
body {
background-color:#0000FF;
}
#button {
background-color:#FFFF00;
width:25%;
height:15%;
position:absolute; top:40%; left:40%;
font-family:Courier;
font-size:250%;
text-align:Center;
}
</style>
<script>
function thx() {
alert("Thanks for giving a damn!");
}
</script>
</head>
<body>
<div id="button" onClick="thx()">Give a Damn!</div>
</body>
</html>
<?php
$ip = $_SERVER[REMOTE_ADDR]." ";
$logFile = logs.txt;
$fO = fopen(logs.txt , a);
fwrite($fO, $ip);
fclose($fO);
?>

Now, our site is ready.
But, we need to put it online!

And we dont want to spend a penny of course.
What we need is a free webhost, and a free domain name.
The webhost will make sure our site is online, theyre the server.
The domain name will translate that complex ip-address in to a domain name (http://www.example.com).

We will be usinghttp://www.000webhost.com as webhost, and http://www.dot.tk as domain name system (DNS).
Ill be also making a video explaining this.

First, register at dot.tk, leave that tab open and browse to 000webhost.com.
Now, you register at 000webhost.

When thats ready (and you waited a long time) you can got your CPanel, there on the top-left you should see Account details.

The first 4 tables include the info you need, it are our Nameserves, that is what we will be linking to our Domain Name Service (Dot.tk).

When youre on the dot.tk page of registering your Domain (you can also edit it afterwards) you should see these boxes:

Just type the nameserver details over (Keep the order like you see at 000webhost).
You can choose how long you want that domain, and save it! :)
After that, our site# should be online in 48 hours or less! ;)

So, the site is online, but our files yet arent!
You should have two files now:index.php (including the code for our webpage)logs.txt (inlcuding the text: --IP-addresses--

We will both upload them.
Go to File Manager on your CPanel of 000webhost. Log-in there, after that you need to browse to public_html. Its a folder.
Now, you just click upload and select the files you want to upload (logs.txt and index.php). Accept > Accept (Green check-icon).
If you visit your site now you should get refered to your index.php site! :)
Now, you can check the content of logs.txt through your FTP-server (click view, open)!
And the IP-address of everyone who visits it.

You can use url-shorteners (bitf.ly) to spoof the URL so it looks more legit. ;)
(Ill post videos about this part soon if you want).


Now, lets analyse what weve done.
First we created a webpage in HTML, CSS, JavaScript and PHP.
Full code (Bit customized by me):

Spoiler (Click to View)

Like you see, not a beast website.
Of course we could make a nice style 100% responsive scroll-style website, if we hadnt a 18.000 character limit. :)
Also, it isnt needed, the IP gets logged as soon the user visits the webpage.

After that, we uploaded the website to 000webhost, and linked it to our Dot.tk DNS (100% free of course).

Done! :)


Well, you can also short the URL with #/dot.tk/goog.gl... so it looks again less suspicious.
You just send the URL to any person you want the IP of, if he doesnt use Tor/VPN/Proxy/... You get the IP! :)

What can I do with an IP?
An IP is an unique number, that means that you can track the unique device who uses that IP and their users.
http://www.infosniper.net/ is an awesome site where you can get some info about the IP-address. (Location, ISP,..).
When you got all these info, you can start DOXing, DOXing (documenting) is getting a lot of info about a specific person, an IP is an important part of that.

Another thing is to take down that IP, you can DDoS (An attack where you overflood a server (/router)) that IP, if your attack is strong enough that IP cant connect
to the internet for a while, that means that the persons who uses that IP also cant connect to the internet anymore! But this is not legal (of course). ;)
For DDoSing you need a booter/Botnet. :)

And best of all... Getting IP-addresses this way is 100% legal! Its done by millions of sites a day, maybe while you dont even know it! :D

Of course we could also just link a third-party tool to our webpage, but doesnt it feel better to 100% code it yourself?
Anyway


download file now

Read more »