Configuring OpenVPN to Amazon EC2 - amazon-ec2

I am trying to configure OpenVPN to my Amazon EC2 Ubuntu instance. I have opened up both TCP and UDP ports on both the load balancer and the VPC instance. I can connect if I open my putty session to the server and set a SSH tunnel on port 1194, and then connect OpenVPN on localhost 1194, but I am trying to figure out how to set my DNS entry so that I can just connect through the VPN using UDP without setting a SSH tunnel. Any advice? I have tried so many combinations and read everything I can find...

Ok, I finally worked it out. The cname has to match the actual address of the vpc directly, it cannot go through the load balancer and the aname matches the IP of the OpenVPN.

Related

Unable to ping local IP address back from Alibaba ECS

I have an ECS instance running in alibaba. My ECS is in a VPC that has a SSL server. I have downloaded the SSL client certificate which allows me to connect to openVPN and to ping the ECS instance from my local box while connected to openVPN.
However, when I login to the ECS instance, I am unable to ping back my local box. My security group is a basic one which allows all connections. I didn't touch the outbound connection.
Here are the details of my SSL Server, and successful ping screenshot (My ECS Primary Private IP Address is 192.168.0.201)
Here is a screenshot of my unsuccessful attempt to ping my local home IP address (The IP, 192.168.10.190,in the screenshot below is an arbitrary one for illustration purpose) from the ECS instance.
When you connect to VPN, you're assigned a private client IP of 192.168.2.0/24 as per your SSL VPN settings. This is the network that will be used for your VPN connection. From your screenshot I see that you're pinging to your local 192.168.10.190. Your cloud server does not have access to this network.
You can try pinging to your client 192.168.2.0/24 IP from your ECS. You probably will need to a the route to your VPC > Route Tables. I haven't tried connecting cloud server via SSL VPN myself, but I've used IPSec for two-way site-to-site connection, which is more suitable for this situation.

cannot ping aws ec2 server or launch webpage after port 80/443 setup

I created a simple web application on AWS ec2 ubuntu instance, but was unable to access the webpage by ip and port from other machines. The application binds on 0.0.0.0:80, and this port has been added into ufw allowing list. Within the aws control panel, I also added 80 to the rule lists.
Currently, I could access the port 22 by telnet ip 22 but no way to get responses from ping ipaddress, it shows request timeout. It also blocks on telnet ip 80 without any responses.
Any ideas? Really appreciate it
here are some troubleshooting tips.
Check if the web application is actually running
you can do this simply by doing a telnet ip 80 from the instance itself
disable the internal firewall
try disabling the firewall inside the instance, see whether it's working.
ping
In order for ping to work, enable ICMP protocol in your AWS security group

Not able to access EC2 custom port from remote machine

I have hosted web application (developed in PHP) on Amazon EC2 micro instance. As per default setting, i can access 80, 22, 443 and 3306 ports from remote locations means from Home(terminal window) using telnet command.
I want to open another custom TCP port XXXXX. I have added that port in Security Group. when i am trying to connect that port through telnet command it is always show "Connection refused".
I have been trying to solve this issue for 3 days but could not get successful solution.
Help would be really appreciated.
Thanks
Adding a port in security group (inbound) ensures that the port can be accessed from outside. Please check following
Is the port open for anywhere (0.0.0.0/0) or for a custom IP. If for custom IP, please check the IP of your machine (search 'what is my ip' on google).
Is there any application listening on the port on EC2 machine.

Unable to connect to moquette in aws ec2 instance

I am new to MQTT and have been trying to implement MQTT MOquette on AWS EC2, i tried the configuration and installation of broker on my machine and was able to connect and test it from client, however when i do the same from Aws EC2 instance i can see the ports 1883, 8080 listening to 0.0.0.0 ip address but when i connect from client i am not able to connect.
While configuring host in local machine i provided 0.0.0.0 for host and ports 1883, 8080 and on AWS server i provided the private ip for host and ports are 1883, 8080. I have added rules in security groups to allow tcp on 1883 & 8080.
My question is what should be the host value i should use on AWS like private ip or aws url like 'ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com' and what would be the url from which i could access broker from client like 'tcp://ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com' or the IP
What would i be doing wrong here ?? stuck with this issue
Thanks All
After some search i was finally able to solve the issue, i was always checking for security groups where everything was right but i missed adding rule in ec2 instance firewall for the ports 1883, 8080. Once its done i was able to connect to the broker from external clients.
Thanks for all who tried to help.

How to add a route to Amazon VPC into an instance's OpenVPN connection?

I want to setup a render farm in EC2 (all Win2012r2) with several slaves an one instance with a OpenVPN connection to our office LAN (all OSX).
What I have done so far:
setup VPC 10.42.0.0/16
setup OpenVPN 10.8.0.0/24, one instance as client, the server is in our office 192.168.1.0/24, the connection is working flawlessly
added 10.8.0.0/24 and 192.168.1.0/24 to the VPC Route Tables/Routes Tab with target: VPN client instance
Source/dest checks turned off for the VPN client instance
What is working:
I can ping around in the VPC
I can ping around the VPN
What doesn't work:
ping from VPN server to the clients VPC-address
ping from a slave node to the VPN net
some debugging:
wireshark on the VPN client 10.8.0.14 shows a ping echo 'no response' when trying to ping 10.8.0.14 from 10.42.243.30, so the return route seems to be broken
So how do get the VPC working that every instance can ping to the VPN server and additionally our office lan?
Regards,
Dennis
I suspect you need to configure your Network ACLs (Security Groups) to allow all inbound and outbound traffic between your VPC nodes.
I figured out the Windows service Routing and Remote Access didn't run as suspected.
No everything works like a charm!
--Dennis
Please check your VPN Settings from OpenVpn Admin Page. Specify the private subnets to which all clients should be given access at Rooting section from the VPN Settings Tab on OpenVPN Admin Page.

Resources