Skip to contentSkip to conversation

bridge + nat

DISCUSSION George Alexandru Dragoi 2 participants 6 messages Jul 19, 2004

lore
Share & tools
lore
#0 lore raw

Hello, i am trying to make a linux machine as both router and bridge. The linux machine will be connected to internet and to the lan. One of the LAN machines will get public ips, and the rest, including the linux bridging interface will have ips from private space. How do i share internet to those computer? the public ip will be on some windows machine which has voip, and i'm not sure just forwarding ports to that machine will make voip working, so i am thinking to do this bridge. Thank you for any suggestion/hint

#1 lore raw
Quoted 1 line · George Alexandru Dragoi

Hello, i am trying to make a linux machine as both router and bridge.

How many NICs do you have in the machine?

So long as you are bridging between some group of NICs, and then routing between the bridge group and the other NICs, then you should be able to simply set up routing, netfilter etc using device name br0 for the bridge.

You cannot do bridging and routing on the same group of NICs.

Hope this helps,

Regards,

Antony.

Signature · 6 lines
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

                                                     Please reply to the list;
                                                           please don't CC me.
#2 lore raw

That is what i wanted to do, with 2 NICs to make a bridge between internet and the LAN, assign the public ip to one of the LAN machine, and prite ips to the rest of machines, and to hope it will work, seems not, i hoped i could do this. If the voip hardware/software wont work in nat with port forward, i wont change there with linux. Maybe there is a suggestion for that voip, or if i can do this with 3 NICs, and 1 single public IP.

Thanks in advance

Quoted 27 lines · Antony Stone
Quoted 1 line · George Alexandru Dragoi

Hello, i am trying to make a linux machine as both router and bridge.

How many NICs do you have in the machine?

So long as you are bridging between some group of NICs, and then routing between the bridge group and the other NICs, then you should be able to simply set up routing, netfilter etc using device name br0 for the bridge.

You cannot do bridging and routing on the same group of NICs.

Hope this helps,

Regards,

Antony.

--
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

Please reply to the list;
please don't CC me.

#3 lore raw
Quoted 4 lines · George Alexandru Dragoi

That is what i wanted to do, with 2 NICs to make a bridge between internet and the LAN, assign the public ip to one of the LAN machine, and prite ips to the rest of machines, and to hope it will work, seems not, i hoped i could do this.

No. With 2 NICs you can either bridge, or route, but not both.

With 3 NICs you could bridge 2 of them together, and route between the bridged pair and the 3rd NIC, however in this situation I think you would need to have an IP address on the bridged pair, and you say you have only 1 public IP address available?

Quoted 4 lines

If the voip hardware/software wont work
in nat with port forward, i wont change there with linux. Maybe there is a suggestion for that voip, or if i can do this with 3 NICs, and 1 single public IP.

With only 1 public IP address I think you are stuck as soon as you assign that address to any machine except the VoIP server.

Why do people keep on coming up with protocols which don't work across NAT?

NAT works at OSI layer 3. Any higher level protocols should not care about
it.

Regards,

Antony.

Signature · 6 lines
There's no such thing as bad weather - only the wrong clothes.

 - Billy Connolly

                                                     Please reply to the list;
                                                           please don't CC me.
#4 lore raw

Somebody told methere are situations where you can specify to voip software(or hardware, i have no ideea how voip works) which ip should expect to have for port forward situations. Well seems i have to stay with windows and winproxy who like to suggest to browsers to download index.html from google.com :), and no QoS.

Thank you for clarifying

Quoted 42 lines · Antony Stone
Quoted 4 lines · George Alexandru Dragoi

That is what i wanted to do, with 2 NICs to make a bridge between internet and the LAN, assign the public ip to one of the LAN machine, and prite ips to the rest of machines, and to hope it will work, seems not, i hoped i could do this.

No. With 2 NICs you can either bridge, or route, but not both.

With 3 NICs you could bridge 2 of them together, and route between the bridged pair and the 3rd NIC, however in this situation I think you would need to have an IP address on the bridged pair, and you say you have only 1 public IP address available?

Quoted 4 lines

If the voip hardware/software wont work
in nat with port forward, i wont change there with linux. Maybe there is a suggestion for that voip, or if i can do this with 3 NICs, and 1 single public IP.

With only 1 public IP address I think you are stuck as soon as you assign that address to any machine except the VoIP server.

Why do people keep on coming up with protocols which don't work across NAT?

NAT works at OSI layer 3. Any higher level protocols should not care about
it.

Regards,

Antony.

--
There's no such thing as bad weather - only the wrong clothes.

- Billy Connolly

Please reply to the list;
please don't CC me.

#5 lore raw

False Alarm

There is no voip, it is just that computer with a modem for fax stuff, the friend who asked for help just told me. Anyway,it is good to know i can't use the bridge that way. Thank you Anthony again

Quoted 55 lines · George Alexandru Dragoi

Somebody told methere are situations where you can specify to voip software(or hardware, i have no ideea how voip works) which ip should expect to have for port forward situations. Well seems i have to stay with windows and winproxy who like to suggest to browsers to download index.html from google.com :), and no QoS.

Thank you for clarifying

Quoted 42 lines · Antony Stone
Quoted 4 lines · George Alexandru Dragoi

That is what i wanted to do, with 2 NICs to make a bridge between internet and the LAN, assign the public ip to one of the LAN machine, and prite ips to the rest of machines, and to hope it will work, seems not, i hoped i could do this.

No. With 2 NICs you can either bridge, or route, but not both.

With 3 NICs you could bridge 2 of them together, and route between the bridged pair and the 3rd NIC, however in this situation I think you would need to have an IP address on the bridged pair, and you say you have only 1 public IP address available?

Quoted 4 lines

If the voip hardware/software wont work
in nat with port forward, i wont change there with linux. Maybe there is a suggestion for that voip, or if i can do this with 3 NICs, and 1 single public IP.

With only 1 public IP address I think you are stuck as soon as you assign that address to any machine except the VoIP server.

Why do people keep on coming up with protocols which don't work across NAT?

NAT works at OSI layer 3. Any higher level protocols should not care about
it.

Regards,

Antony.

--
There's no such thing as bad weather - only the wrong clothes.

- Billy Connolly

Please reply to the list;
please don't CC me.