Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    [Bounty] 2x NIC - NIC 1incoming for server, NIC 2 to provide NAT to connected device
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    [Bounty] 2x NIC - NIC 1incoming for server, NIC 2 to provide NAT to connected device

    As the title says, I have a Dell R410 which has two Broadcom Gigabit NICs.

    The first NIC is currently occupied by my incoming network drop and is the primary one used by my server. I would like to take NIC two and make it a NAT interface to provide connectivity to a rpi inside of the case (powered internally).

    Is there a way to reserve NIC two as an interface out to the rpi and bond it to receive outbound traffic through NIC one? Essentially, funnel all trafic back from the rpi, to NIC two, passing to NIC one and out to the world?

    Bounty available via any Payment method for successful answers (implementation if possible)!

    Comments

    • Can't you just use NAT/IP forwarding as normal to nic2? You'd have to loop a network cable from back inside the case from NIC2, but other than that it's just a case of setting up forwarding and IP addresses on NIC2/RPi

    • This case, is almost like using tunnelbroker from he.net.

      But how do you connect the rpi to the network card?

    • FrankZFrankZ Member
      edited September 2018

      Mr_Tom said: Can't you just use NAT/IP forwarding as normal to nic2? You'd have to loop a network cable from back inside the case from NIC2, but other than that it's just a case of setting up forwarding and IP addresses on NIC2/RPi

      What he say ^^^^

      Thanked by 1ErawanArifNugroho
    • @Mr_Tom said:
      Can't you just use NAT/IP forwarding as normal to nic2? You'd have to loop a network cable from back inside the case from NIC2, but other than that it's just a case of setting up forwarding and IP addresses on NIC2/RPi

      Do you have some reference docs on this that I could lean on in regards to your above advice? My queries aren't leading me to something that I can extrapolate from.

    • Give NIC2 a static local IP, and give the Pi a similar IP on the same subnet. Set the gateway on the pi to be the address of NIC2, then following something like this.

      https://www.revsys.com/writings/quicktips/nat.html

      In the above example, eth1 would be your NIC2, and eth0 NIC1 which is connected to the wider world.

    • JackHJackH Moderator

      If you can, please don't encourage people to MASQUERADE ;) He's only got a single IP (so sure, masquerading won't have much of a performance hit, but it's best practice not to anyway) to nat so SNAT would be much more appropriate in this case.

      There's some great documentation here: https://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html

      Thanked by 1uptime

      NVMe KVM VPS in Amsterdam, Stockholm, Oslo, Vienna and LA ($2.50/1GB RAM/10GB NVMe/month) (AFF LINK)

    • I do have a /29 which has one reserved on the front end of the subnet for my IP incoming to NIC one and I reserved the backend for iDRAC.

      I started messing around with it on Ubuntu, but looks like in 18.04 they went with this new netplan YAML cloud init configuration, which is proving to be a real PITA...

      Thank you for all your suggestions, I just need a good nudge in the right direction.

    • JackHadrill said: If you can, please don't encourage people to MASQUERADE ;) He's only got a single IP (so sure, masquerading won't have much of a performance hit, but it's best practice not to anyway)

      Apologies - I only suggested this as an option that I have used in the past :)

      Reading your link yes SNAT would probably be a better option.

    • JackHJackH Moderator

      Mr_Tom said: Apologies - I only suggested this as an option that I have used in the past

      >

      No problem! It's not just you - I often see people recommending it. :D

      NVMe KVM VPS in Amsterdam, Stockholm, Oslo, Vienna and LA ($2.50/1GB RAM/10GB NVMe/month) (AFF LINK)

    Sign In or Register to comment.