0

I'm looking for a solution to proxify all the outgoing connections through several network interfaces so that they would appear to come from different IP's and I'm using Ubuntu 18.04 EC2's.

What I tried was creating an instance, assigning two network interfaces and attaching elastic IP's to both of them. Next I went for creating the bond, however, it doesn't seem to be working properly as I can't connect to the instance anymore.

Here's my netplan bond.yaml

network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      match:
        macaddress: 0a:02:a8:33:c8:4a
      set-name: eth0
    eth1:
      dhcp4: no
      match:
        macaddress: 0a:90:d2:4c:a5:a8
      set-name: eth1
  bonds:
    bond0:
      dhcp4: yes
      interfaces:
      - eth0
      - eth1
      parameters:
        mode: balance-rr

It seems to be validated just fine. Am I missing something or there could be a different approach?

Thanks,

  • linux bonding (similar to linux teaming, or to cisco etherchannel) is working at layer 2 level or less, not at IP (layer 3) level and is usually intended for failover or performance (bandwidth). So as you describe relying on bonding to use multiple IPs, it appears to me something is flawed in your conception of the subject. What you'd need is probably a multi-homed configuration which usually requires policy routing, but in the context of amazon ec2, I wouldn't know. – A.B Mar 19 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.