Questions tagged with Amazon EC2
Content language: English
Sort by most recent
I am having trouble setting up a working wire guard vpn server on an ec2 instance, I created the `wg0.conf` file with the following contents ``` [Interface] Address = 10.10.0.1/24 ListenPort = 10001 PrivateKey = <server_private_key> SaveConfig = false PostUp = /etc/wireguard/helper/add_nat.sh PostDown = /etc/wireguard/helper/del_nat.sh [Peer] PublicKey = <removed> AllowedIPs = 10.10.0.2/32 ``` the contents of `add_nat.sh` ``` #!/bin/bash IPT="/sbin/iptables" IN_FACE="ens5" # NIC connected to the internet WG_FACE="wg0" # WG NIC SUB_NET="10.10.0.0/24" # WG IPv4 sub/net aka CIDR WG_PORT="10001" # WG udp port ## IPv4 ## $IPT -t nat -I POSTROUTING 1 -s $SUB_NET -o $IN_FACE -j MASQUERADE $IPT -I INPUT 1 -i $WG_FACE -j ACCEPT $IPT -I FORWARD 1 -i $IN_FACE -o $WG_FACE -j ACCEPT $IPT -I FORWARD 1 -i $WG_FACE -o $IN_FACE -j ACCEPT $IPT -I INPUT 1 -i $IN_FACE -p udp --dport $WG_PORT -j ACCEPT ``` then i enabled port forwarding by setting `net.ipv4.ip_forward=1` in `/etc/sysctl.conf`, I also allow the port 10001 on UDP using the command `ufw allow 10001/udp` and I added that port rule to the inbound rules in ec2 security group on my laptop I configured `wg0.conf` like so ``` [Interface] PrivateKey = <laptop_private_key> Address = 10.10.0.2/24 DNS = 126.96.36.199 [Peer] PublicKey = <server_public_key> AllowedIPs = 10.10.0.0/24 Endpoint = <ec2_elastic_ip>:10001 PersistentKeepalive = 10 ``` Trying to ping the server from my laptop results in 100% packet loss same as for the server side. Is there something I missing or is there any errors in my configuration?
Hello, I need to solve this problem for my bachelor thesis. I want to run ubuntu ami on EC2 and use it as a remote DHCP server. This has to be within the free tier so I can't use elastic IPs and also NAT. I'm running Ubuntu 22.04 LTS with public IPv4 assigned and an access security group configured. Should I use EC2 public IPv4 address as default gateway when configuring DHCP? In theory it should work with the configured ip helper address from the remote router (my local router). Do I need to worry about AWS because they only route unicast? If you have any advice I will be grateful. Thank you very much for any answers.
I just created an AWS account for the purpose of using AWS EC2 virtual machine at some point in the future. However I don't need to use it yet (probably in the next 6-12 months). How can I pause the 12 month free-tier until I am ready to use EC2? Thanks,
We currently are using Amazon Elastic Compute Cloud t2.large with Windows Server 2012 R2. Microsoft support for Windows Server 2012 R2 ends October 10, 2023. Does that mean we’ll need to upgrade our current AWS setup? If so, what is the cutoff date for when this needs to get done.
How to configure EC2 Instance on AWS Free tier to avoid being charged for running single instance on t2micro?
I have a sample nodeJS application running on ElasticBeanStalk on a single instance without the load balancer. I read through the Free Tier documents to make sure i am following the guidance to stay in free tier but i still keep getting these small charges despite the changes i have made. I have single instance running t2micro . I have attached the breakdown of billing below. For some reason i am charged per/hr for running t2micro in a single instance as well . Is there anything i am doing wrong? i know the charged amount is small but still it shud fall under free tier. Any help will be appreciated. I have attached the screenshot of EC2 dashboard and Billing details below ![Billing](/media/postImages/original/IM0crffGbYRg-kXjbK4lhhLw) ![EC2 dashboard](/media/postImages/original/IM7h9PGiIyRJKiNy-alOeVUA)
Hello Everyone, I have a Private EKS cluster. I want to access my cluster from a new Ec2 instance having kubectl and aws cli installed. Previously, everything is fine means i am able to access my Eks cluster and performing kubectl commands. But accidentally, i deleted aws-auth-cm.yml file. Then after It gives error : "You must be logged in to the Cluster (Unauthorised)". After that, i created a new eks cluster, with the same name, configuration and roles. And deleted previous one. Kindly, requesting or guide me how to access my eks cluster now step by step. I studied lot of articles and posts. But problem not solved.
I allocated an Elastic IP address in Middle East (UAE) Region(*188.8.131.52*) but IP generated is belongs to Bahrain regions ![Enter image description here](/media/postImages/original/IMd7WZttJgTKS9IKCmZJYL6A)
Hi, I ran into an issue with our logging from Kubernetes pods. We store logging in JSON format, but saw that with big JSON logs it was breaking. So I investigated the isssue. Found out that when you are sending big logs from the pods with for example `cat log/test.log > /proc/1/fd/1` It will ends in multiple parts into the node log folder (/var/log/pods/pod) `2023-03-24T11:53:33.107458625Z stdout P YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 2023-03-24T11:53:33.107458625Z stdout P YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 2023-03-24T11:53:33.107458625Z stdout P YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY` This breaks the JSON. How can we avoid that sending big log files to /proc/1/fd/1, will be splitted into multiple parts? Thank you!
when I try to log in to FileZilla by using credentials that I created in FTP in an EC2/Lightsail (Ubuntu) instance, it was not connected. otherwise, I use a keypair, it will work. Please give a reason and give a proper procedure for creating FTP Server by using an EC2/Lightsail. Thank You in Advance
I have created 4 EC-2 instances. Three of them in us-east-1c and one in use-east-1d.I have created two target groups with two instances each. I have created a simple html page in each server using putty and created application load balancer with default http to target group 1. But when I want to divert to target group 2 using path base listener it shows URL not found 404 error. I have created index.html file in each server root directory /var/www/html. When using ALB DNS name it displays target group 1 server i.e. server 1 and server2. In root directory of server 3 and server 4 I created a random folder like images. When I assigned listener path to /images and forwarded to target group 2 i.e. server 3 and server 4 the URL shows not found. What mistake am I doing here? Kindly explain
I am trying to create a free tier EC2 instance in N.virginia. The task fails with the error "This account is currently blocked and not recognized as a valid account. Please contact email@example.com if you have questions."Also tried with different region as Mumbai. In both the cases got the same message.
when I scan my ec2 machine using aws patch manager, I am getting this error [ERROR]:**Error loading entrance module.** Traceback (most recent call last): File "/var/log/amazon/ssm/patch-baseline-operations/common_os_selector_methods.py", line 125, in _get_snapshot_info ssm_client = client_selector.get_default_client(instance_id, region, "ssm") File "/var/log/amazon/ssm/patch-baseline-operations/patch_common/client_selector.py", line 61, in get_default_client