OpenVPN Configuration Issue - Public IP

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have configured an OpenVPN server in the cloud (Digital Ocean), using this guide.



I have downloaded the client 'ovpn' file, (client is also Ubuntu), and have established a connection ok. However, when I check my public IP from my client, the IP is still showing my dynamic IP assigned by my ISP. Is there a way for my external IP to be the public IP of my VPN server?



As the IP's from my ISP are always blocked by Spamhaus (I'm setting up a home Exchange server lab), I would like a dedicated, static IP provided via my OpenVPN server.










share|improve this question























  • What OS is your client running? What's the output of ip route when you're connected?
    – Vanessa Deagan
    Mar 13 at 18:04














up vote
0
down vote

favorite












I have configured an OpenVPN server in the cloud (Digital Ocean), using this guide.



I have downloaded the client 'ovpn' file, (client is also Ubuntu), and have established a connection ok. However, when I check my public IP from my client, the IP is still showing my dynamic IP assigned by my ISP. Is there a way for my external IP to be the public IP of my VPN server?



As the IP's from my ISP are always blocked by Spamhaus (I'm setting up a home Exchange server lab), I would like a dedicated, static IP provided via my OpenVPN server.










share|improve this question























  • What OS is your client running? What's the output of ip route when you're connected?
    – Vanessa Deagan
    Mar 13 at 18:04












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have configured an OpenVPN server in the cloud (Digital Ocean), using this guide.



I have downloaded the client 'ovpn' file, (client is also Ubuntu), and have established a connection ok. However, when I check my public IP from my client, the IP is still showing my dynamic IP assigned by my ISP. Is there a way for my external IP to be the public IP of my VPN server?



As the IP's from my ISP are always blocked by Spamhaus (I'm setting up a home Exchange server lab), I would like a dedicated, static IP provided via my OpenVPN server.










share|improve this question















I have configured an OpenVPN server in the cloud (Digital Ocean), using this guide.



I have downloaded the client 'ovpn' file, (client is also Ubuntu), and have established a connection ok. However, when I check my public IP from my client, the IP is still showing my dynamic IP assigned by my ISP. Is there a way for my external IP to be the public IP of my VPN server?



As the IP's from my ISP are always blocked by Spamhaus (I'm setting up a home Exchange server lab), I would like a dedicated, static IP provided via my OpenVPN server.







openvpn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 13 at 16:19









pomsky

23.2k77299




23.2k77299










asked Mar 13 at 15:54









DMK

1




1











  • What OS is your client running? What's the output of ip route when you're connected?
    – Vanessa Deagan
    Mar 13 at 18:04
















  • What OS is your client running? What's the output of ip route when you're connected?
    – Vanessa Deagan
    Mar 13 at 18:04















What OS is your client running? What's the output of ip route when you're connected?
– Vanessa Deagan
Mar 13 at 18:04




What OS is your client running? What's the output of ip route when you're connected?
– Vanessa Deagan
Mar 13 at 18:04










1 Answer
1






active

oldest

votes

















up vote
1
down vote













I don't know how your specific provider is set up to work, but the VPN connection is normally set up to route all traffic through the VPN.



Check if your ISP modem is the default gateway.



$ ip route
default via 192.168.0.1 dev wlo1 proto static metric 600


where 192.168.0.1 is my modem IP in this case. The VPN connection (tun0) should also be in this table if you've connected successfully.



Delete the default gateway, and if that fixes the IP issue (or if you can't connect at all), it means your traffic was being routed through your ISP.



$ sudo ip route del default via 192.168.0.1


You can add it again with



$ sudo ip route add default via 192.168.0.1





share|improve this answer




















  • An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
    – DMK
    Mar 13 at 17:35










  • Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
    – DMK
    Mar 13 at 17:36










  • Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
    – Ratler
    Mar 13 at 17:48










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1014625%2fopenvpn-configuration-issue-public-ip%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













I don't know how your specific provider is set up to work, but the VPN connection is normally set up to route all traffic through the VPN.



Check if your ISP modem is the default gateway.



$ ip route
default via 192.168.0.1 dev wlo1 proto static metric 600


where 192.168.0.1 is my modem IP in this case. The VPN connection (tun0) should also be in this table if you've connected successfully.



Delete the default gateway, and if that fixes the IP issue (or if you can't connect at all), it means your traffic was being routed through your ISP.



$ sudo ip route del default via 192.168.0.1


You can add it again with



$ sudo ip route add default via 192.168.0.1





share|improve this answer




















  • An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
    – DMK
    Mar 13 at 17:35










  • Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
    – DMK
    Mar 13 at 17:36










  • Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
    – Ratler
    Mar 13 at 17:48














up vote
1
down vote













I don't know how your specific provider is set up to work, but the VPN connection is normally set up to route all traffic through the VPN.



Check if your ISP modem is the default gateway.



$ ip route
default via 192.168.0.1 dev wlo1 proto static metric 600


where 192.168.0.1 is my modem IP in this case. The VPN connection (tun0) should also be in this table if you've connected successfully.



Delete the default gateway, and if that fixes the IP issue (or if you can't connect at all), it means your traffic was being routed through your ISP.



$ sudo ip route del default via 192.168.0.1


You can add it again with



$ sudo ip route add default via 192.168.0.1





share|improve this answer




















  • An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
    – DMK
    Mar 13 at 17:35










  • Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
    – DMK
    Mar 13 at 17:36










  • Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
    – Ratler
    Mar 13 at 17:48












up vote
1
down vote










up vote
1
down vote









I don't know how your specific provider is set up to work, but the VPN connection is normally set up to route all traffic through the VPN.



Check if your ISP modem is the default gateway.



$ ip route
default via 192.168.0.1 dev wlo1 proto static metric 600


where 192.168.0.1 is my modem IP in this case. The VPN connection (tun0) should also be in this table if you've connected successfully.



Delete the default gateway, and if that fixes the IP issue (or if you can't connect at all), it means your traffic was being routed through your ISP.



$ sudo ip route del default via 192.168.0.1


You can add it again with



$ sudo ip route add default via 192.168.0.1





share|improve this answer












I don't know how your specific provider is set up to work, but the VPN connection is normally set up to route all traffic through the VPN.



Check if your ISP modem is the default gateway.



$ ip route
default via 192.168.0.1 dev wlo1 proto static metric 600


where 192.168.0.1 is my modem IP in this case. The VPN connection (tun0) should also be in this table if you've connected successfully.



Delete the default gateway, and if that fixes the IP issue (or if you can't connect at all), it means your traffic was being routed through your ISP.



$ sudo ip route del default via 192.168.0.1


You can add it again with



$ sudo ip route add default via 192.168.0.1






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 13 at 16:35









Ratler

9710




9710











  • An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
    – DMK
    Mar 13 at 17:35










  • Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
    – DMK
    Mar 13 at 17:36










  • Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
    – Ratler
    Mar 13 at 17:48
















  • An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
    – DMK
    Mar 13 at 17:35










  • Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
    – DMK
    Mar 13 at 17:36










  • Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
    – Ratler
    Mar 13 at 17:48















An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
– DMK
Mar 13 at 17:35




An ip route does indeed state that my home router is the default gateway (192.168.1.254). Deleting the route disconnects the VPN, and I'm unable to connect again until I add it back.
– DMK
Mar 13 at 17:35












Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
– DMK
Mar 13 at 17:36




Adding... push "redirect-gateway autolocal"... into the server config file has no effect either.
– DMK
Mar 13 at 17:36












Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
– Ratler
Mar 13 at 17:48




Sounds like it might not have connected properly to the VPN. Might be useful to include in your question the output of "ip route" while you're connected to the VPN.
– Ratler
Mar 13 at 17:48

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1014625%2fopenvpn-configuration-issue-public-ip%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491