Making a two-way bridge between two interfacesHost only adapter with guest external accessPing through GRE...
Make a transparent 448*448 image
Welcoming 2019 Pi day: How to draw the letter π?
Is it possible that AIC = BIC?
At what level can a dragon innately cast its spells?
How to explain that I do not want to visit a country due to personal safety concern?
Have researchers managed to "reverse time"? If so, what does that mean for physics?
Professor being mistaken for a grad student
Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements
Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?
Russian cases: A few examples, I'm really confused
Use of プラトニック in this sentence?
Good allowance savings plan?
Happy pi day, everyone!
Define, (actually define) the "stability" and "energy" of a compound
Why are there 40 737 Max planes in flight when they have been grounded as not airworthy?
What is the greatest age difference between a married couple in Tanach?
I need to drive a 7/16" nut but am unsure how to use the socket I bought for my screwdriver
How to deal with a cynical class?
How to make healing in an exploration game interesting
Science-fiction short story where space navy wanted hospital ships and settlers had guns mounted everywhere
Current sense amp + op-amp buffer + ADC: Measuring down to 0 with single supply
Will a pinhole camera work with instant film?
How could a female member of a species produce eggs unto death?
Where is the 1/8 CR apprentice in Volo's Guide to Monsters?
Making a two-way bridge between two interfaces
Host only adapter with guest external accessPing through GRE tunnel discarded between 2 interfaces of a router - Ping does not reach subnetDoes a bridge between 2 TAP interfaces need an IP address?IP masquerading, rule to forward packets between the Interfaces (on a multihomed network device)VirtualBox bridged adapter works for everything EXCEPT guest to hostLogging LAN traffic with ebtables-iptables-ddwrtet0 vs tun0 with OpenVPNSetting up simple NAT with iptables - which of two solutions is correct?Bridging two interfaces while siphoning some trafficWorking ssh but cannot use scp. How?
I want to bridge a connection, I made a quick drawing of my setup: (eth0 isn't connected to anything). All of the computers are running CentOS 7.
I wish to allow PC A to ping and send packets to PC B, and vice versa. Both of the PCs should also be able to ping / send packets to the server, however they should not be able to access the internet. I have tried solutions with iptables such as This answer, but that only allowed PC A to ping the server, no interconnection.
Do you have any idea how I could set this up?
linux networking wireless-networking iptables
add a comment |
I want to bridge a connection, I made a quick drawing of my setup: (eth0 isn't connected to anything). All of the computers are running CentOS 7.
I wish to allow PC A to ping and send packets to PC B, and vice versa. Both of the PCs should also be able to ping / send packets to the server, however they should not be able to access the internet. I have tried solutions with iptables such as This answer, but that only allowed PC A to ping the server, no interconnection.
Do you have any idea how I could set this up?
linux networking wireless-networking iptables
add a comment |
I want to bridge a connection, I made a quick drawing of my setup: (eth0 isn't connected to anything). All of the computers are running CentOS 7.
I wish to allow PC A to ping and send packets to PC B, and vice versa. Both of the PCs should also be able to ping / send packets to the server, however they should not be able to access the internet. I have tried solutions with iptables such as This answer, but that only allowed PC A to ping the server, no interconnection.
Do you have any idea how I could set this up?
linux networking wireless-networking iptables
I want to bridge a connection, I made a quick drawing of my setup: (eth0 isn't connected to anything). All of the computers are running CentOS 7.
I wish to allow PC A to ping and send packets to PC B, and vice versa. Both of the PCs should also be able to ping / send packets to the server, however they should not be able to access the internet. I have tried solutions with iptables such as This answer, but that only allowed PC A to ping the server, no interconnection.
Do you have any idea how I could set this up?
linux networking wireless-networking iptables
linux networking wireless-networking iptables
edited 7 mins ago
karel
9,27293139
9,27293139
asked Jul 15 '15 at 19:17
Alex ShmakovAlex Shmakov
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
That is easy: do not specify default gateway/default route on PC's A and B. This should keep both A and B from reaching the Internet and each other. To allow A and B to communicate with each other, add static routes on each PC to reach the other's network. Add a static route on PC A to PC B's network, and add a static route on PC B to PC A's network.
Assume that PC A's network is 10.0.0.0/30 and PC B's network is 10.0.0.4/30. On PC A, run (as root) route add -net 10.0.0.4/30 gw [ip_of_eth2]
and on PC B, run (also as root) route add -net 10.0.0.0/30 gw [ip_of_eth3]
. Also, make sure that IP forwarding is enabled on the server (i.e. /proc/sys/net/ipv4/ip_forward
should be 1
).
This is of course routing, not bridging, but it is more suitable based on your topology and need.
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f941088%2fmaking-a-two-way-bridge-between-two-interfaces%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
That is easy: do not specify default gateway/default route on PC's A and B. This should keep both A and B from reaching the Internet and each other. To allow A and B to communicate with each other, add static routes on each PC to reach the other's network. Add a static route on PC A to PC B's network, and add a static route on PC B to PC A's network.
Assume that PC A's network is 10.0.0.0/30 and PC B's network is 10.0.0.4/30. On PC A, run (as root) route add -net 10.0.0.4/30 gw [ip_of_eth2]
and on PC B, run (also as root) route add -net 10.0.0.0/30 gw [ip_of_eth3]
. Also, make sure that IP forwarding is enabled on the server (i.e. /proc/sys/net/ipv4/ip_forward
should be 1
).
This is of course routing, not bridging, but it is more suitable based on your topology and need.
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
add a comment |
That is easy: do not specify default gateway/default route on PC's A and B. This should keep both A and B from reaching the Internet and each other. To allow A and B to communicate with each other, add static routes on each PC to reach the other's network. Add a static route on PC A to PC B's network, and add a static route on PC B to PC A's network.
Assume that PC A's network is 10.0.0.0/30 and PC B's network is 10.0.0.4/30. On PC A, run (as root) route add -net 10.0.0.4/30 gw [ip_of_eth2]
and on PC B, run (also as root) route add -net 10.0.0.0/30 gw [ip_of_eth3]
. Also, make sure that IP forwarding is enabled on the server (i.e. /proc/sys/net/ipv4/ip_forward
should be 1
).
This is of course routing, not bridging, but it is more suitable based on your topology and need.
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
add a comment |
That is easy: do not specify default gateway/default route on PC's A and B. This should keep both A and B from reaching the Internet and each other. To allow A and B to communicate with each other, add static routes on each PC to reach the other's network. Add a static route on PC A to PC B's network, and add a static route on PC B to PC A's network.
Assume that PC A's network is 10.0.0.0/30 and PC B's network is 10.0.0.4/30. On PC A, run (as root) route add -net 10.0.0.4/30 gw [ip_of_eth2]
and on PC B, run (also as root) route add -net 10.0.0.0/30 gw [ip_of_eth3]
. Also, make sure that IP forwarding is enabled on the server (i.e. /proc/sys/net/ipv4/ip_forward
should be 1
).
This is of course routing, not bridging, but it is more suitable based on your topology and need.
That is easy: do not specify default gateway/default route on PC's A and B. This should keep both A and B from reaching the Internet and each other. To allow A and B to communicate with each other, add static routes on each PC to reach the other's network. Add a static route on PC A to PC B's network, and add a static route on PC B to PC A's network.
Assume that PC A's network is 10.0.0.0/30 and PC B's network is 10.0.0.4/30. On PC A, run (as root) route add -net 10.0.0.4/30 gw [ip_of_eth2]
and on PC B, run (also as root) route add -net 10.0.0.0/30 gw [ip_of_eth3]
. Also, make sure that IP forwarding is enabled on the server (i.e. /proc/sys/net/ipv4/ip_forward
should be 1
).
This is of course routing, not bridging, but it is more suitable based on your topology and need.
edited Jul 15 '15 at 21:51
answered Jul 15 '15 at 21:31
LarssendLarssend
2,35121930
2,35121930
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
add a comment |
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
Unfortunately, I couldn't modify the routing information on my PCs because of an unrelated reason. Thank you for your answer though! I'll keep it here as future reference for people creating similar situations. I managed to find an old router lying around and just connected all three computers to it. That eliminated any need for bridging or routing.
– Alex Shmakov
Jul 15 '15 at 21:58
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f941088%2fmaking-a-two-way-bridge-between-two-interfaces%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown