Configure pacemaker's src addr - pacemaker

I'm trying to configure my corosync cluster with 2 ips:
- 1 public
- 1 private
I do have 3 primitives:
- 2 ipaddr2 to mount ips
- 1 ipsrcaddr to src from the private ip in it's subnet
My problem is that ipsrcaddr replaces the default gateway with my private address as source, like this:
~# ip r s
default via 92.181.55.1 dev ens3 src 192.168.0.11
92.181.55.1 dev ens3 scope link
192.168.0.0/24 dev ens4 scope link via 192.168.0.11
I can no longer send traffic with my public ip after resource starts :/
Anyone experienced the same issue ? Any advice ?
Thanks

Related

access ibm cloud private dash board

I have installed ICP within a private newtork. And each VM having public IP address. I am able to access ICP dashboard using master node private IP address (https://master-node-private-ip:8443).
But I am not able to access using master node public IP address (https://master-node-public-ip:8443). I tried with setting cluster_lb_address: in config.yaml file.
But it doesn't work.
In config.yaml file, uncomment and set both your cluster_lb_address and proxy_lb_address to the master node public IP address. In cluster/hosts file, all the IPs must have the same subnet.
Example:
# cat cluster/hosts
[master]
172.16.151.126
[worker]
172.16.151.182
172.16.155.135
[proxy]
172.16.151.126
#[management]
#4.4.4.4
#[va]
#5.5.5.5
config.yaml
------------------------------
cluster_lb_address: 9.x.x.x
proxy_lb_address: 9.x.x.x

Unable to access internet from Private subnet | Error: Cannot find a valid baseurl

I am trying to use a NAT Instance rather than a NAT Gateway; I am also not using any Community AMIs for the NAT Instance configuration.
I am trying to do a yum update from my private but I am thrown the following error: Cannot find a valid baseurl for repo: amzn-main/latest
My AWS stack is as follows:
VPC: A VPC VPC1 with an Internet Gateway IGW1 attached.
Subnets: Two subnets - public in us-east-1a and private in us-east-1b.
Public subnet: Subnet1.1-1a has Route table [Public-IGW-1 with local and IGW1 - 0.0.0.0/0].
Private subnet: Subnet1.2-1b has Route table [Private-1 with local and NAT instance NAT EC2 1- 0.0.0.0/0].
Route tables:
Private-1 has routes local and NAT EC2 1 instance - 0.0.0.0/0.
Public-IGW-1 has routes local and IGW1 - 0.0.0.0/0.
Security groups: Subnet-1.1-1a-Public from us-east-1a in VPC1 has SSH MyIP and HTTP with anywhere.
Subnet1.1-1a-Private from us-east-1b (have to rename; else deceiving) in VPC1 has inbound 22 - anywhere.
Instances:
NAT EC2 1 lives in Subnet1.1-1a of VPC1 with Security group NAT SG inbound 80 - anywhere 22. Private instance has SG - 22 - anywhere. Public instance has SG - 22 - MyIP and 80 - anywhere.
I copied my keypair into the public instance with scp and ssh-ed into the private instance with ssh -i keypair ec2-user#private-ip-addr. When I do a sudo yum update the error canot find a valid baseurl is shown.
I have made sure that NACL is allowing all traffic.
I figured it. The NAT Instance and the Public Instance have to be in the same security groups.

How to connect datastax dev center to remote cluster in amazon EC2 instance?

I have set the following.
rpc_address to external public ip.
Listen Address : internal ip address (not the local host),
rpc_broad_cast: internal ip address
On Dev center, I am using external ip and port 9042.
Let me know, if am doing anything wrong.
Thank you snakecharmerb for trying to help me out on this.
I was able to find a solution for this myself. The actual problem was I was using Dev Center 1.4 to connect to Cassandra 3. Once I upgraded to the Dev Center 1.5, it worked like a charm with SSH Local port forwarding enabled.
These are the following settings
Listen Address : internal ip address (not the localhost),
rpc_address: internal ip address (same as above)
Steps After setting the above steps
On my terminal enabled local port forwarding
ssh -L 9042::9042 #
Start Dev Center 1.5
It worked like a charm
It's worked finally :
steps :
1. set listen_address to private IP of EC2 instance.
2. do not set any broadcast_address
3. set rpc_address to 0.0.0.0
4. set broadcast_rpc_address to public ip of EC2 instance.

ec2.py ec2.ini inventory pull on ec2 instance on a private subnet

I have the following on my AWS
1 vpc
3 subnets - 1 public , 2 private
1 internet gateway
1 nat instance
1 ec2 instance in public subnet
1 ec2 instance (for DB) in private subnet
With routing tables set and all instance running
I ran my ec2.py to pull my inventory and I saw that I dont have details of my ec2 instance from my private subnet
any idea why ?
I thought its my IAM role I am using. but I did give admin access to that role.
in my Ec2.ini I have the following
destination_variable = public_dns_name
vpc_destination_variable = private_ip_address
I did try private_dns_name and ip_address
Actually it worked
the following combination pulled all the ec2 instances.
destination_variable = public_dns_name
vpc_destination_variable = private_ip_address

How external interfaces work in OMNETPP/INET?

I have been trying in the past few days to build and run a very simple network to no avail (most of the network I try to build is borrowed from extServer example). No matter my configuration in terms of IP addresses, routes etc. I cannot seem to make it work.
I have seen many people struggling with it, but have not found any solutions posted anywhere. The readme file in the Emulation folder of INET is more confusing than helpful.
Hence, I would like your help in making the following simple network work and, hopefully, even make it (the post) a tutorial for others as well.
The network I want to build (could not be simpler):
External Server <----> [ext0] ROUTER [ppp0] <----> [ppp0] Standard Host
My setup:
Software:
OMNET++ 4.6 with PCAP enabled.
INET Integration head (includes several features that I like).
OS:
Xubuntu in VirtualBox as a guest which hosts OMNET++. The reason for using Virtualbox is that my Host Win 7 machine refuses to run any external interface example with the error "cSocketRTScheduler: couldn't set socketopt for raw socket.". I modified the source a bit and used WSAGetLastError function, which resolved the issue as "The requested address is not valid in its context.".
Back to VirtualBox :)
Xubuntu has one network interface set to Host-only networking with IP address 10.0.0.1 and netmask 255.255.255.0 .
Standard Host Setup in omnetpp.ini:
**.server.numTcpApps = 1
**.server.tcpApp[*].typename = "TCPSinkApp"
**.server.tcpApp[*].localAddress = "172.0.1.111"
**.server.tcpApp[*].localPort = 10021
The standard host is using the same server.mrt from extServer example.
The router.mrt is as follows:
ifconfig:
# interface 1 to server
name: ppp0
inet_addr: 172.0.1.100
Mask: 255.255.255.0
MTU: 1500
POINTTOPOINT MULTICAST
# interface 2 to external server (real network interface)
name: ext0
inet_addr: 10.0.0.2
Mask: 255.255.255.0
MTU: 1500
POINTTOPOINT MULTICAST
ifconfigend.
route:
#Destination Gateway Genmask Flags Metric Iface
172.0.1.111 172.0.1.100 255.255.255.255 H 0 ppp0
10.0.0.1 10.0.0.2 255.255.255.255 H 0 ext0
0.0.0.0 * 0.0.0.0 G 0 ext0
routeend.
Any ideas on how to make this network work are really welcome as, should it work, I want to expand it later. Also, I would greatly appreciate it if any suggestions are in step-by-step style.
Thank you in advance.

Resources