Howdy, Stranger!

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


Bridge two interfaces into one
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Bridge two interfaces into one

CFarenceCFarence Member
edited April 2016 in Help

Sorry for the long post :)

So I have a server that runs my teamspeak has two network interfaces one that has a network that is not DDOS protected and one that is tunneled from BuyVM. I currently have the connections both working as they should and I can use wget with the bind-address option to check that I get the correct IP address on each of the interfaces.

Now I must find a way to have a third interface that is bridged to those two. The reason for this is because Teamspeak is not able to route the packets properly itself. Teamspeak does listen on each of the connections but when it gets a connection on the second interface it doesn't try to set the packets back through the second interface. I have looked this up in their forums and other people have seen the same issue. The Teamspeak developers claim its a UDP problem but I setup a Mumble server on the same server that Teamspeak was running on and had it listen on both interfaces. I was immediately able to connect to Mumble through the Non DDOS protected interface and the DDOS protected one without any problem. I also had someone connect through the DDOS protected interface while I was connected through the Non DDOS protected interface and Mumble worked as expected. So either Mumble found a way to combat this "UDP" problem or Teamspeak just has a bug in it.

So in order to fix Teamspeak I need it to be able to listen on one interface but that interface has connections to both networks. I'm pretty sure this can be accomplished buy setting up a NAT that is only running on the server and has the two interfaces as gateways for that NAT. Using some IPTables rules it can be instructed to send packets back out the interface from which it came.

I believe a setup like this article HOWTO: Multirouting with Linux sets up should do it. Essentially I do have two ISPs. The thing I don't really care about is load balancing the out going packets, but the rules about sending the packets back out the same interface they came in on is what I want. The thing I need help with is setting up the NAT. I need a interface on the same server that has a NATed IP and that NAT needs to use the routing this sets up for it. I have found similar guides on line but each assume that the third interface will be connected to a switch with other machines on the network. That is something I don't need.

Comments

  • You should be able to bridge the GRE interface to the physical interface and do away with NAT but it's never worked for me!

  • No you can't bridge a GRE interface, it is an IP interface, not an Ethernet interface. You can only bridge Ethernet interfaces. You need to use NAT (REDIRECT probably).

  • linuxthefishlinuxthefish Member
    edited April 2016

    @rds100 said:
    No you can't bridge a GRE interface, it is an IP interface, not an Ethernet interface. You can only bridge Ethernet interfaces. You need to use NAT (REDIRECT probably).

    On Cisco you can bridge GRE and others have reported it working in older kernels :(

    http://www.arubanetworks.com/techdocs/ArubaOS_64x_WebHelp/Content/ArubaFrameStyles/Network_Parameters/Configuring_GRE_Tunnels.htm

    Mentions you can tunnel layer 2 across ethernet but again not linux

    Like
    http://blog.asiantuntijakaveri.fi/2012/01/layer-2-over-layer-3-using-linux-built.html?m=1 I tried but with no luck.

  • CFarence said: Teamspeak does listen on each of the connections but when it gets a connection on the second interface it doesn't try to set the packets back through the second interface.

    More then likely your routing table is the problem. If the default route is back via the primary interface, then it will pass the traffic to that port.

  • @MarkTurner said:

    CFarence said: Teamspeak does listen on each of the connections but when it gets a connection on the second interface it doesn't try to set the packets back through the second interface.

    More then likely your routing table is the problem. If the default route is back via the primary interface, then it will pass the traffic to that port.

    I'll try that when I get home, I think I never tried setting specific rules. Strange how mumble just worked without me doing anything.

  • @MarkTurner said:
    More then likely your routing table is the problem. If the default route is back via the primary interface, then it will pass the traffic to that port.

    I think I have the routing setup correctly, apache is able to pass through along with ssh. I can connect to each over the 2 interfaces perfectly. A port scan for Teamspeak shows that the port is open|filtered when scanning the DDOS protected IP. Though trying to connect it still fails, I'm pretty sure its still sending the packets back the wrong interface.

    Teamspeak just doesn't want to use two interfaces, I'm still trying to find a way to have one interface that is connected to both networks. That way teamspeak won't have to deal with it.

  • The routing is going to determine where the traffic goes.

    If the traffic comes in on port 2 and the best route (or maybe only route) is back via port 1 then that is where your traffic will go.

    PM me your routing table and interface config.

Sign In or Register to comment.