

Yeah that's more or less what I want to do. All incoming traffic on those ports is going to come through tun0. Obviously response traffic back out also needs to go over tun0. But I want all other traffic originating on the machine or routing through it to go out through eth1...what do I need to do to do this?1clue wrote:You have two different kinds of http traffic.
You have traffic related to your web server and the static IP, and then you have all the browser traffic from your home. Your VPN endpoint will be accepting http traffic and forwarding it to you, probably on a non-routable ip address, or ipv6 maybe.
Full disclosure: I've never used the sort of service you're talking about. I've configured OpenVPN so my coworkers and I can get into the office, but you're doing something different.
In the former instance the requests are inbound and all going to your public IP, which is going to be translated into some sort of a 10.x.y.z probably. So you set up routes for that and pretty much everything else is taken care of. Make sure your web server box routes all vpn response traffic back through the vpn rather than direct.
The first question you need to ask is does this service allow inbound connections to their public ip and route it through your VPN connection?. I'm using a VPN service with OpenVPN to get a public IP.
While I'm definitely NOT a VPN expert, this doesn't make sense.chiefbag wrote:The first question you need to ask is does this service allow inbound connections to their public ip and route it through your VPN connection?. I'm using a VPN service with OpenVPN to get a public IP.
I doubt if they do myself as this would require them to provide a public ip for each client they have, what is the name of the service/provider that you are using?
Most services of this nature only provide you with outbound traffic option.
While I'm definitely NOT a VPN expert, this doesn't make sense.
The second statement is true, however there may well be valid reasons why the person would want to make a home based server accessible via public ip address, for example they may want to access Internet of Things gadgets etc, ie turn the heating or kettle on.The way I understand it, the VPN will add significant latency which will make the site seem more sluggish than if it were hosted on a public port right at the site,
Code: Select all
iptables -t nat -I PREROUTING -i tun0 -p tcp -m tcp --dport 8080 -m state --state NEW,RELATED,ESTABLISHED -j DNAT --to-destination 10.10.10.10Some don't even give you a public ip address unless you are a business customer therefor dyndns etc. won't workI guess this is a little late, but most ISPs allow you to buy a public IP address to facilitate people accessing their home systems from work.
Or you could use dynamic dns?

Doesn't every VPN provider that allows torrent traffic (as most do) therefore allow inbound connections?chiefbag wrote:The first question you need to ask is does this service allow inbound connections to their public ip and route it through your VPN connection?
I doubt if they do myself as this would require them to provide a public ip for each client they have, what is the name of the service/provider that you are using?
Most services of this nature only provide you with outbound traffic option.
I'd be willing to bet that they have multiple clients per ip address. When you login to a corporate VPN it's one IP address and they have potentially thousands of clients. Think IBM.chiefbag wrote:So you reckon every VPN provider ascribes an individual public ip to each client?Doesn't every VPN provider that allows torrent traffic (as most do) therefore allow inbound connections?