OpenVPN client binding to network interface

Multi tool use
I am trying to bind an openvpn client's connection to an Ethernet port(eth1) in order to route an entire network through it.
I have already configured the OpenVPN server and tested it on a Windows client.
Server
The server is connected to the internet with interface "ens3" and "tun0" for the vpn. IP forwarding is enabled.
OpenVPN config
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret /etc/openvpn/static.key
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
cipher AES-128-CBC
Client
The client will be running Raspbian Stretch Lite (Debian based). It has two Ethernet port eth0 and eth1. eth0 is connected to the internet with a static IP. I wish to route all of the openvpn traffic through eth1. A wireless router will plugged into eth1.
Client Config
remote XXX.XXX.XXX.XXX
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret /etc/openvpn/static.key
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
cipher AES-128-CBC
How do I route the traffic to eth1?
linux networking openvpn
add a comment |
I am trying to bind an openvpn client's connection to an Ethernet port(eth1) in order to route an entire network through it.
I have already configured the OpenVPN server and tested it on a Windows client.
Server
The server is connected to the internet with interface "ens3" and "tun0" for the vpn. IP forwarding is enabled.
OpenVPN config
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret /etc/openvpn/static.key
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
cipher AES-128-CBC
Client
The client will be running Raspbian Stretch Lite (Debian based). It has two Ethernet port eth0 and eth1. eth0 is connected to the internet with a static IP. I wish to route all of the openvpn traffic through eth1. A wireless router will plugged into eth1.
Client Config
remote XXX.XXX.XXX.XXX
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret /etc/openvpn/static.key
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
cipher AES-128-CBC
How do I route the traffic to eth1?
linux networking openvpn
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12
add a comment |
I am trying to bind an openvpn client's connection to an Ethernet port(eth1) in order to route an entire network through it.
I have already configured the OpenVPN server and tested it on a Windows client.
Server
The server is connected to the internet with interface "ens3" and "tun0" for the vpn. IP forwarding is enabled.
OpenVPN config
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret /etc/openvpn/static.key
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
cipher AES-128-CBC
Client
The client will be running Raspbian Stretch Lite (Debian based). It has two Ethernet port eth0 and eth1. eth0 is connected to the internet with a static IP. I wish to route all of the openvpn traffic through eth1. A wireless router will plugged into eth1.
Client Config
remote XXX.XXX.XXX.XXX
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret /etc/openvpn/static.key
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
cipher AES-128-CBC
How do I route the traffic to eth1?
linux networking openvpn
I am trying to bind an openvpn client's connection to an Ethernet port(eth1) in order to route an entire network through it.
I have already configured the OpenVPN server and tested it on a Windows client.
Server
The server is connected to the internet with interface "ens3" and "tun0" for the vpn. IP forwarding is enabled.
OpenVPN config
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret /etc/openvpn/static.key
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
cipher AES-128-CBC
Client
The client will be running Raspbian Stretch Lite (Debian based). It has two Ethernet port eth0 and eth1. eth0 is connected to the internet with a static IP. I wish to route all of the openvpn traffic through eth1. A wireless router will plugged into eth1.
Client Config
remote XXX.XXX.XXX.XXX
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret /etc/openvpn/static.key
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
cipher AES-128-CBC
How do I route the traffic to eth1?
linux networking openvpn
linux networking openvpn
edited Feb 24 at 16:29
Mr Shunz
3,45912128
3,45912128
asked Feb 24 at 16:11
Reseau DuPontReseau DuPont
1
1
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12
add a comment |
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f502712%2fopenvpn-client-binding-to-network-interface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f502712%2fopenvpn-client-binding-to-network-interface%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
J3hML,tQ3,kMrn1oBoTIHvE ktsQibBxMCP7XkWynN,mamkB Ryb4s4CAS5wkpe4AQ7 DyoyA wki
Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs?
– tink
Feb 24 at 16:59
Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router
– Reseau DuPont
Feb 24 at 17:12