-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help me vpc -> bastion -> rds #43
Comments
Just to well understand your issue : You connect to the bastion from your computer ==> ELB (10.0.x.0/24) ==> Bastion (10.0.10x.0/24) right ? For the rds connection, you connect directly with the bastion ? I meen using psql on the bastion For the newtork part, all seems OK in what you describe.
10.0.10x.0/24 is public or private ? |
ELB is in public subnet I Succeed to connection on bastion host with ssh -i .. ec2-user@, ELB ( 10.0.x.0/24 ) -> bastion ( 10.0.10x.0/24 ) -> RDS ( 10.0.20x.0/24 ) 10.0.10x.0/24 is private .. security group on RDS |
Telnet is not enabled it's normal. awk '!/AllowTcpForwarding/' /etc/ssh/sshd_config > temp && mv temp /etc/ssh/sshd_config
echo "AllowTcpForwarding no" >> /etc/ssh/sshd_config What command to you use to open the ssh tunnel ? |
sh -N -L 5432:testdb.c4ph7qms4ytk.eu-west-3.rds.amazonaws.com:5432 ec2-user@tf-lb-20190501161031900800000004-d40f07fdab3ad749.elb.eu-west-3.amazonaws.com -i innovagro-infrastructure-live/non-prod/bastion where :
it's ready ? |
Imo you cannot use the same local and remote port. Try replacing the first 5432 by 5433. Please retry in verdbose mode (-v) and share the output. |
first command : ok to connect bastionssh ec2-user@tf-lb-20190502164059063400000001-5c5860b0e0f80ee7.elb.eu-west-3.amazonaws.com -i bastion [ec2-user@ip-10-0-101-152 ~]$ second command : kossh -N -L 5432:innovagro-stage-baccus-db.c4ph7qms4ytk.eu-west-3.rds.amazonaws.com:5432 ec2-user@tf-lb-20190502164059063400000001-5c5860b0e0f80ee7.elb.eu-west-3.amazonaws.com -i bastion |
mmmh I don't see any error... The ssh tunnel is not giving you the hand back and it's normal. You have to open a new terminal and then use a psql command with 127.0.0.1 as the hostname while the tunnel is running. |
Eureka ! i find current valueresource "aws_security_group" "bastion_host_security_group" { ingress { egress { egress { egress { tags = "${merge(var.tags)}" modification valueresource "aws_security_group" "bastion_host_security_group" { ingress { egress { tags = "${merge(var.tags)}" |
I use this great terraform module, but i don't know if this is my configuration is good
sg "from-internet"
input : 22/80/443 - 0.0.0.0/0
output : All - 0.0.0.0/0
sg "from-public-subnet"
input : 22/80/443 - 10.0.x.0/24 with x between 0-2
output : All - 0.0.0.0/0
sg "from-private"
input : 22/80/443 - 10.0.10x.0/24 with x between 0-2
output : All - 0.0.0.0/0
sg "from-private-to-db"
input : 5432 - 10.0.10x.0/24 with x between 0-2
output : All - 0.0.0.0/0
with security group from-private-to-db
I use bastion module with
but i succeed to connect to bastion host ssh -i ec2-user@, but i don't access to rds ....
are you one idea.
The text was updated successfully, but these errors were encountered: