Access web server behind OpenVPN client
up vote
1
down vote
favorite
Okay so:
- I have a machine running an OpenVPN client (it's connecting to a server elsewhere, the machine does not act as the server)
- The machine also has an Nginx web server
- When the OpenVPN client is disconnected, my web server is accessible externally and internally (as desired)
- When the OpenVPN client is connected, my web server is accessible only internally
- Oddly it can still be accessed over its FQDN so I presume there's some weird internal DNS loopback caching happening? How does this work?
I would like all outgoing traffic to be forwarded through the VPN, or to exclude Nginx from the VPN.
Is this at all possible? How would I achieve this?
vpn proxy openvpn webserver nginx
add a comment |
up vote
1
down vote
favorite
Okay so:
- I have a machine running an OpenVPN client (it's connecting to a server elsewhere, the machine does not act as the server)
- The machine also has an Nginx web server
- When the OpenVPN client is disconnected, my web server is accessible externally and internally (as desired)
- When the OpenVPN client is connected, my web server is accessible only internally
- Oddly it can still be accessed over its FQDN so I presume there's some weird internal DNS loopback caching happening? How does this work?
I would like all outgoing traffic to be forwarded through the VPN, or to exclude Nginx from the VPN.
Is this at all possible? How would I achieve this?
vpn proxy openvpn webserver nginx
1
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Okay so:
- I have a machine running an OpenVPN client (it's connecting to a server elsewhere, the machine does not act as the server)
- The machine also has an Nginx web server
- When the OpenVPN client is disconnected, my web server is accessible externally and internally (as desired)
- When the OpenVPN client is connected, my web server is accessible only internally
- Oddly it can still be accessed over its FQDN so I presume there's some weird internal DNS loopback caching happening? How does this work?
I would like all outgoing traffic to be forwarded through the VPN, or to exclude Nginx from the VPN.
Is this at all possible? How would I achieve this?
vpn proxy openvpn webserver nginx
Okay so:
- I have a machine running an OpenVPN client (it's connecting to a server elsewhere, the machine does not act as the server)
- The machine also has an Nginx web server
- When the OpenVPN client is disconnected, my web server is accessible externally and internally (as desired)
- When the OpenVPN client is connected, my web server is accessible only internally
- Oddly it can still be accessed over its FQDN so I presume there's some weird internal DNS loopback caching happening? How does this work?
I would like all outgoing traffic to be forwarded through the VPN, or to exclude Nginx from the VPN.
Is this at all possible? How would I achieve this?
vpn proxy openvpn webserver nginx
vpn proxy openvpn webserver nginx
asked Nov 23 at 21:00
Jake Stanger
1116
1116
1
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34
add a comment |
1
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34
1
1
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f1377886%2faccess-web-server-behind-openvpn-client%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
1
What OS and router setup? The abreviated answer is to do policy based routing on the device with the VPN client so that traffic to/from the web server (at least on port 80/443) goes through a different route table which does not have the VPN as a default gateway.
– davidgo
Nov 23 at 23:00
Ubuntu server, the router is a Sky Hub so nothing fancy at all. I'll look into that and report back if I get something working, cheers.
– Jake Stanger
Nov 27 at 20:16
Where is the OpenVPN client running? (Ubuntu or Sky Hub?)
– davidgo
Nov 27 at 20:20
Ubuntu. Should have specified that, sorry. The hub does nothing more than basic home firewall and port forwarding (plus acting as a router...).
– Jake Stanger
Nov 27 at 20:34