Multiple IPs on a single VPN?
-
- Posts: 2
- Joined: Sun Nov 23, 2014 11:41 pm
Multiple IPs on a single VPN?
I have a VPS server that has multiple IP addresses attached with it. How can I set the VPN to work with different IPs?
-
- Posts: 137
- Joined: Mon Mar 24, 2014 3:59 am
Re: Multiple IPs on a single VPN?
SoftEther does not implement interface or address binding like other VPN implementations. You can get a better answer by specifically describing what you want to do.
-
- Posts: 2
- Joined: Sun Nov 23, 2014 11:41 pm
Re: Multiple IPs on a single VPN?
dajhorn wrote:
> SoftEther does not implement interface or address binding like other VPN
> implementations. You can get a better answer by specifically describing
> what you want to do.
Well my VPS has two IP addresses, lets say x.x.x.1 and x.x.x.2. When you connect to x.x.x.1 your public IP will display at x.x.x.1. However you can also connect to the VPN with x.x.x.2, but your public IP still displays as x.x.x.1. I'm wanting to make it so when you connect through the second IP (x.x.x.2) your IP addresses shows up differently.
> SoftEther does not implement interface or address binding like other VPN
> implementations. You can get a better answer by specifically describing
> what you want to do.
Well my VPS has two IP addresses, lets say x.x.x.1 and x.x.x.2. When you connect to x.x.x.1 your public IP will display at x.x.x.1. However you can also connect to the VPN with x.x.x.2, but your public IP still displays as x.x.x.1. I'm wanting to make it so when you connect through the second IP (x.x.x.2) your IP addresses shows up differently.
-
- Posts: 137
- Joined: Mon Mar 24, 2014 3:59 am
Re: Multiple IPs on a single VPN?
SoftEther lacks an easy option for the behavior that you want.
If you actually need strict IP binding, then you must run more than one instance of the SoftEther daemon using wrappers or containers.
Alternatively, if you want particular users to use particular IP addresses for outbound traffic, then group users into separate virtual hubs, bridge those virtual hubs into separate tap interfaces, and use something like dnsmasq to route the traffic according to the originating tap interface.
If you actually need strict IP binding, then you must run more than one instance of the SoftEther daemon using wrappers or containers.
Alternatively, if you want particular users to use particular IP addresses for outbound traffic, then group users into separate virtual hubs, bridge those virtual hubs into separate tap interfaces, and use something like dnsmasq to route the traffic according to the originating tap interface.
-
- Posts: 4
- Joined: Fri Feb 14, 2014 9:55 am
Re: Multiple IPs on a single VPN?
Hi,
I am trying to achieve the same thing. If I have 2 ip addresses I am able to create 2 virtual hubs and use l2 bridge to bridge them to 2 tap interfaces and use dnsmasq and iptables to nat the two interfaces to the two different ips. The only problem left though is that I want to have the same users on both hubs (they are actually radius users), but give them the oportunity to choose the outgoing ip based on the ip they connect to. So I cannot figure out a way to distinguish the two hubs (or two instances) to bind each one to different ip address. I have read the docs and old forum posts where there were suggestions to use wrappers (particularly authbind) to implement interface binding, but I cannot see how this will help to achieve the two hubs (or two instances) to bind to two different addresses on the same interface. Can someone help?
Thanks.
I am trying to achieve the same thing. If I have 2 ip addresses I am able to create 2 virtual hubs and use l2 bridge to bridge them to 2 tap interfaces and use dnsmasq and iptables to nat the two interfaces to the two different ips. The only problem left though is that I want to have the same users on both hubs (they are actually radius users), but give them the oportunity to choose the outgoing ip based on the ip they connect to. So I cannot figure out a way to distinguish the two hubs (or two instances) to bind each one to different ip address. I have read the docs and old forum posts where there were suggestions to use wrappers (particularly authbind) to implement interface binding, but I cannot see how this will help to achieve the two hubs (or two instances) to bind to two different addresses on the same interface. Can someone help?
Thanks.
-
- Posts: 65
- Joined: Mon Nov 17, 2014 2:11 pm
Re: Multiple IPs on a single VPN?
Run Softether in user mode and configure iptables.
More info http://arstechnica.com/civis/viewtopic. ... &t=1195455
More info http://arstechnica.com/civis/viewtopic. ... &t=1195455
-
- Posts: 4
- Joined: Fri Feb 14, 2014 9:55 am
Re: Multiple IPs on a single VPN?
Hi,
This is useful to make two instances use two outgoing ips, which however I already did using two tap interfaces which use two outgoing ips using iptables. My problem is I cannot bind two hubs/instances (preffer to do it with hubs, but if impossible instances are fine too) to listen to two different ips for incoming connections.
This is useful to make two instances use two outgoing ips, which however I already did using two tap interfaces which use two outgoing ips using iptables. My problem is I cannot bind two hubs/instances (preffer to do it with hubs, but if impossible instances are fine too) to listen to two different ips for incoming connections.
-
- Posts: 65
- Joined: Mon Nov 17, 2014 2:11 pm
Re: Multiple IPs on a single VPN?
You want to bind two instances on the same port ? Or you have problem with routing two IP? Like request are coming to IP1 but server responds from IP2 ?
-
- Posts: 4
- Joined: Fri Feb 14, 2014 9:55 am
Re: Multiple IPs on a single VPN?
Hi,
I want users to be able to connect to same ports on the two ips, but when they connect to ip1 they go out from ip1 and when they connect to ip2 they go out from ip2.
If I figure out a way to make two hubs/instances listen for incoming connections on each interface I can create two bridges with two tap interfaces and set them to the two different outgoing ips with iptables (I can achieve the same with two instances). The problem is I cannot find a way to make two separate hubs/instances listen for incoming connections each one on different ips.
I want users to be able to connect to same ports on the two ips, but when they connect to ip1 they go out from ip1 and when they connect to ip2 they go out from ip2.
If I figure out a way to make two hubs/instances listen for incoming connections on each interface I can create two bridges with two tap interfaces and set them to the two different outgoing ips with iptables (I can achieve the same with two instances). The problem is I cannot find a way to make two separate hubs/instances listen for incoming connections each one on different ips.
-
- Posts: 65
- Joined: Mon Nov 17, 2014 2:11 pm
Re: Multiple IPs on a single VPN?
To use the same port for different instances is not possible for now because softether bind to 0.0.0.0 IP. But you can move softether deeper to vps (with private ips) then iptables can help you. Otherwise need to add some code into softether.