Strange issue with AWS VPC Private link endpoint

Hai guys, sorry for discontinuing this blog for a long time; got distorted with work pressure and a lot of changes in my life! This Covid-19 lockdown time made me think about my blog and planned to start it again

Recently I was working for one of the clients to set up an AWS account for there internal product. Meantime one of my team members got into a strange issue while creating private link endpoint from an endpoint service. I got involved in it and got to know that it some issue with AWS availability zone assignment! I will be explaining how this issue come in to notice and what AWS asked us to do resolve the issue.

Before starting on the issue; let me explain what exactly I am trying to achieve. My client is having multiple products and multiple teams working on different projects on the AWS platform. One of the projects wanted to access one of the services running on a different AWS account, which is fully running on the private network and it’s not exposed to the public network.

To achieve this connectivity, utilized AWS service called Private linking using VPC endpoint services and VPC endpoint interface. High-level architecture will look like this.

A screenshot of a cell phone

Description automatically generated
AWS Pvt Link

How to create an endpoint service in AWS VPC:

  • Create a Network Load Balancer for your application in your VPC and configure it for each subnet (Availability Zone az1, az2, az3) in which the service should be available.
  • Create a VPC endpoint service configuration and specify your Network Load Balancer created above.
  • Grant permissions to specific service consumers (AWS accounts) to create a connection to endpoint service.

Steps to enable service consumers to connect to endpoint service:

  • Creates an interface endpoint with endpoint service name
  • Choose respective VPC and availability zone. We used CloudFormation with default option, this means; it will create in all zones as Account B NLB and Account A is having 3 subnets with az1, az2, az3.
  • To activate the connection, accept the interface endpoint connection request. It’s set to automatically accepted in account B so no actin required in our case.
  • Attached a security group with outgoing tariffing enabled for service ports on VPC CIDR.

So, till here all looks good; but it’s not! When tried to access or telnet endpoint DNS name on service port from account A it’s getting a timeout error.

Root cause:

When validated, I have noticed the endpoint interface created in account A only created interface with 2 availability zone. Asper AWS documents, CloudFormation should have created endpoint interface with 3 availability zones as NLB in Account B and account B is having 3 availability zones!

I have taken this issue with AWS and they came back with a reply saying

When creating endpoint service CloudFormation do not have the option to give AZs. It takes AZs from the NLBs attached.

If you add a subnet later to the NLB in different AZ that change wont take effect on endpoint service. i.e. when you add a subnet to the NLB AFTER you created the Endpoint Service.

But we didn’t add or update any subnet in any of the accounts, it was same old VPC and subnets in both of the accounts! AWS also asked us to delete and create endpoint service and endpoint interface again.

I have also noticed, when we create endpoint interface from AWS console, I do not have any issue and It takes AZs from the NLBs attached and it works as expected.

How to Use Wrapper to Get Root Privilege for Scripts in Plesk Module

When you try to build a Plesk module you will come across number of doubts in that some of them are

How to Run a Shell Script or Binary as Root in Plesk Module?
How to use plesk wrapper to get root privilege for scripts?
How to use plesk wrapper from sbin?
What to do with “failed to open stream: Permission denied” in plesk module?

Plesk-modules
Its very difficult to get help on plesk module development. The tutorial provided by Parallels is really insufficient and incomplete. When I was trying to build a plesk module package, I faced many problems and googling never gave any solution too. After doing so much research I was able to develop a plesk module for my Client. I hope this post will be helpful for many who are trying to build plesk module and wanted root privilege to run a script in it.

Following is one of the methods which I used successfully in plesk 10.4. I hope it will work for all plesk versions.

Imagine you want to build a plesk module and that should have functionality to set ownership of  configuration file to root:root or any other ownership. Also need to write in to /etc/passwd or any file which can be edited only with root permission. This functionality is not possible with simple php script like chown, or system functions. It is because, plesk modules runs under psaadm user privilege so it can’t change files which is under root privilege. But there is one solution for this which is provided in plesk i.e. plesk module wrappers. This can be used to get root privilege for some scripts. To achieve this, you can follow below procedure or steps.

Imagine you have a shell script [setperm.sh] which is used to set permission for all files related to your module. To execute this script with root privilege use following steps.

1) Place setperm.sh under “/usr/local/psa/admin/sbin”  [don’t forget this path is very important]
2) Create a symbolic link in “/usr/local/psa/admin/bin/modules/<ur-module-foldername>”. By executing
“ln -s /usr/local/psa/admin/sbin/wrapper /usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh”
3) You are done with wrapper; now you can use this script in any php file inside your module script and it will execute as root.
4) For example you can call this script like this
<?php
system(/usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh, $varout);
?>
5) You can create this symbolic link while building RPM itself.

So this is all about plesk wrapper usage to get root privilege for scripts under plesk module.

How to Setup Amazon EC2 Cloud Server Tool Locally

Cloud computing you do not generally own the physical infrastructure serving as host to the software platform in question. Instead, they avoid capital expenditure by renting usage from a third-party provider. They consume resources as a service and pay only for resources that they use. Many cloud-computing offerings employ the utility computing model. Sharing “perishable and intangible” computing power among multiple tenants can improve utilization rates, as servers are not unnecessarily left idle it will reduce costs significantly while increasing the speed of application development. A side effect of this approach is that overall computer usage rises dramatically, as customers do not have to engineer for peak load limits. Additionally, “increased high-speed bandwidth” makes it possible to receive the same response times from centralized infrastructure at other sites.
[ad#add-top-in]
Following are some simple Tip and tricks on how to build an application using Amazon Web Services. While purchasing Amazon EC2 you will get auth key and public key to access your EC2 server. You can set this key to your local PC by simple commands bellow.
Down load Tool from http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&categoryID=88

* Before all you need to download java5+ SDK to install this tool

IN LINUX:

export JAVA_HOME=/usr/    [Path to java binary]
export EC2_HOME=/root/amz    [Path to EC2 tool]
Set the environment variables as follow
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=/root/amz/pk-HKZYKTAIG2ECMXYIBH3HXdsd4ZBZQ55CLO.pem
export EC2_PRIVATE_KEY=/root/amz/pk-WAJNB7EJYW4ESF2O74CQsdsddNVU6ZXQ5K.pem
export EC2_CERT=/root/amz/cert-WAJNB7EJYW4ESF2OsdCQSQXNVU6ZXQ5K.pem

IN Windows:

set JAVA_HOME=C:\Sun\SDK\jdk    [Path to java.exe]
set EC2_HOME=C:\amz
set PATH=%PATH%;%EC2_HOME%\bin
set EC2_PRIVATE_KEY=/root/amz/pk-HKZYKTAIG2ECMXYIBH3HXdsd4erZQ55CLO.pem
set EC2_PRIVATE_KEY=/root/amz/pk-WAJNB7EJYW4ESF2O74CQserddNVU6ZXQ5K.pem
set EC2_CERT=/root/amz/cert-WAJNB7EJYW4ESdf2OsdCQSQXNVU6ZXQ5K.pem

So you are done now to test the tool run the following command

#>ec2-describe-regions

Output:
REGION        us-east-1        us-east-1.ec2.amazonaws.com
REGION        eu-west-1        eu-west-1.ec2.amazonaws.com

You can get all commands in /bin folder of EC2 tool you downloaded. Like to start instants stop and restart also search AMI and applications to get password etc.

You can install any of the OS you want Windows or Linux etc and also you can choose verity of OS and pre-installed AMI or even you can create your own AMI using AMI tool provided by EC2. You can create AMI of you local server and also of  VMware images etc.

  • Wile installing Linux OS it installs OS without any password for root, so u don’t want any password while ssh into it.
  • Incas if you need to get the password of the instant you can use the tool you installed to get the password using the command called
PROMPT> ec2-get-password i-2574e22a -k windows-keypair q96A40B9w

Philips 3D 4YOU LCD Monitor and with its first 3D Television set

Panasonic is promoting its 3D TV and even Sony is trying for 3D TV too. Philips is already out with its 3D TV prototype. Even Samsung. The TV can also display standard two-dimensional images, close to HD quality.

This can be done either by direct 3D recording or by converting existing 2D content to 3D content. After that it’s coded with a processor in the TV generates nine slightly different views corresponding to the different angles. From almost any location, a viewer catches a different image in each eye. It is viewed over any 3D television using special glasses that come along with the TV itself.
[ad#add-top-in]
This type of TV is best suited for video gaming. The amount of fun element it will add to Video Gaming. As its very difficult to convert traditional videos into 3D format, new games can very well adapt to the situation and can start creating new games which will be 3D compatible.

A standard laptop running Philips’ software was able to convert the DVD The Lord of the Rings: The Return of the King into 3D in real time and display it on Philips’s new 20-inch 3D 4YOU LCD monitor. A retail-kiosk implementation of the 3-D screen.

Free Simple and Flash Banners, Buttons, Headers and Text Creator

Free Simple and Flash Banners, Buttons, Headers and Text Creator
Freenicetemplates here you can create free graphics flash banners and Cooltext here you can get simple banners and buttons for modern digital advertising media of your website. Simply choose what kind of image you would like. Then fill out a form and you will have your own
[ad#add-top-in]
custom advertising texts and setup the colors for text and background also images. Further more a transparency value for text and background can be adjusted. In case of flash banners no flash skills are required to customize these flash banners, just download and replace flash header photos with yours and change texts, colors and music through an external XML file so all are as simple as that enjoy.

How to Create Best and Free Animated Ajax Loading gif Images

[ad#add-top-in]

Free cool Ajax loading gif image generator. Many Ajax progress indicators or loading animated gif images; that are for free. You can customize these images and set the background colure and also loading image colure in matter of seconds and get it for your site. You can customize the image colure, at the mean time you can preview it before downloading it too. Try this and get coolest Ajax gif animation now……

Worlds Cheapest $10 Dollar Laptop From India

Do you think any thing in the world which is not possible by human beings????!!!

Like a laptop for $10! Yes for 10 dollar Laptop [Rs500 INR], that’s true. Indian government is going to launch $10 laptop soon.

The Indian Government [UPA] is launching the cheapest laptop ever seen priced at $10 even as the private sector, with its best efforts, has not managed to bring down the price of a laptop lower than $100[Rs5000 INR].

[ad#add-top-in]

This ultra low-cost $10 Laptop has been developed with support of IIT (Indian Institute of Technology), Indian Institute of Science and some B Tech students.

Details about the $10 Laptop remained limited, but higher education secretary R.P. Agrawal of India said last week that, it would be available within six months. Officials have not publicly demonstrated a prototype yet also not explained how it can be produced at such a low cost.

Following are some of the configurations.

  • It can be charged with a two-watt power input.
  • 2 GB memory can upgrade.
  • Wireless Internet capability.
  • Capability to project on a screen.
  • The configuration can be upgraded etc.

The government has invested more than 939 million dollars to develop the low-power gadget to work in rural areas with unreliable power supply and poor Internet connectivity etc. The planned laptop is part of a push to increase the number of students in higher education and give them the technological skills needed to further boost India’s economic growth.

Update 31-12-2010

10USD laptop

The Sakshat(10$ Laptop) is of 10” long and 5” wide hand-held device, resembling a modem, helps e-learners access the Web easily. Still contains only mystery parts. It appeared more like a storage device than anything else. As for the $10 price, the expected price is closer to $30 bucks.

Apple is not the first to consider solar power For Mobile Devices

Apple

Apple is reportedly looking into solar panels as a power source for mobile devices. A recently published patent application discovered by the Apple enthusiast site MacRumors.com describes a technique in which solar panels would be built behind a portable device’s LCD screen. From that location, the panels could absorb ambient light that passes through.

The technique would eliminate the need for Apple to redesign its iPods and laptops to make room for the new technology. Among the problems with using solar panels on devices are durability and the need to take up valuable space on the compact devices.

Apple isn’t the first to consider this technique for using solar power. Motorola describes a similar approach in a 2001 patent.
[ad#add-top-in]
Apple and technology companies routinely apply for patents on technology that may never find its way into products.

Apple updated its 3G iPod nano software with 1.1.2 update.

iPod nanao

Apple updated its 3G iPod nano software. Notes on the update are limited. Neither the download or Apple’s support pages contain any specific information on what was fixed.
[ad#add-top-in]
The only information Apple provided was that the update included some bug fixes. The 1.1.2 update is only available through iTunes at this time.

source:read

Next-gen iPhone with Haptic Technology?

Next-Iphone

It seems Apple Inc is in talks with Immersion Corporation to licence for its next-gen iPhone Haptic Technology for its iPhone. if recent internet reports are to be believed. Also Immersion Corporation on Thursday announced that they have appointed former Apple executive Clent Richardson to the position of President and CEO.

Palluxo.com reports: “A source (Apple Inc employee), who chose to remain anonymous, told us that senior executives of the two companies have already met once on Tuesday and the next meeting has been scheduled for Friday morning. The source confirmed that the executives will continue discussions over licencing and implementation issues of iPhone haptics”.

The haptic technology would mean that when users pressed one of the iPhone’s touchscreen icons, or for example a letter in keypad mode, they would get a tiny, vibrating response as feedback that makes the experience feel more “real”.
[ad#add-top-in]
Immersion’s haptic technology for phones is called VibeTonz and is already used in some mobiles. Nokia currently licences the technology and is said to be planning to use it in their touchscreen “Tube” iPhone competitor.

source: read