Assigning a different external ip to each hub.

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
oliver7011
Posts: 4
Joined: Thu Aug 18, 2022 6:40 pm

Assigning a different external ip to each hub.

Post by oliver7011 » Thu Aug 18, 2022 6:45 pm

Hello there,
I have spent many hours looking for a solution to this, many either did not work (probably my fault) or were not specific enough with the solution. Please let me know if there is a good guide I have missed :)

My issue is I would like to assign a different external ip for each hub. I am running softether on ubuntu (aws) and would like to use the secondary ips on my primary interface(eth0). I am aware the solution involves bridges/iptables/dnsmasq but a step by step solution would be much appreciated.

Thank you in advance.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Assigning a different external ip to each hub.

Post by solo » Fri Aug 19, 2022 2:44 am

oliver7011 wrote:
Thu Aug 18, 2022 6:45 pm
I would like to assign a different external ip for each hub. I am running softether on ubuntu (aws) and would like to use the secondary ips on my primary interface(eth0).
Hi, please quote AWS docs supporting these notions:
  • multiple IPs on a single interface, eg. eth0
  • multiple external/public IPs on a single AWS instance

oliver7011
Posts: 4
Joined: Thu Aug 18, 2022 6:40 pm

Re: Assigning a different external ip to each hub.

Post by oliver7011 » Fri Aug 19, 2022 11:24 am

solo wrote:
Fri Aug 19, 2022 2:44 am
oliver7011 wrote:
Thu Aug 18, 2022 6:45 pm
I would like to assign a different external ip for each hub. I am running softether on ubuntu (aws) and would like to use the secondary ips on my primary interface(eth0).
Hi, please quote AWS docs supporting these notions:
  • multiple IPs on a single interface, eg. eth0
  • multiple external/public IPs on a single AWS instance
Sorry perhaps I wasnt clear with my wording, I already have these IPS assigned to my interface but would like each hub to use a separate ip.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Assigning a different external ip to each hub.

Post by solo » Fri Aug 19, 2022 12:06 pm

Does SoftEther recognize them as separate bridgeable devices? You can check it with:
vpncmd localhost:port /server /password:*** /cmd BridgeDeviceList
//replace: *** with SE admin password

oliver7011
Posts: 4
Joined: Thu Aug 18, 2022 6:40 pm

Re: Assigning a different external ip to each hub.

Post by oliver7011 » Fri Aug 19, 2022 12:14 pm

It does if they are on separate interfaces (eth0, eth1, eth2…) but even after bridging these to the hubs, the external ip given to each client is still that of the main server. Is it possible for it to be a different external ip for each hub.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Assigning a different external ip to each hub.

Post by solo » Fri Aug 19, 2022 2:12 pm

oliver7011 wrote:
Thu Aug 18, 2022 6:45 pm
I am aware the solution involves bridges/iptables/dnsmasq but a step by step solution would be much appreciated.
This is definitely doable with soft tap bridges/iptables+nat/dnsmasq. This guide scaled up to the number of required vhubs should help you.

oliver7011
Posts: 4
Joined: Thu Aug 18, 2022 6:40 pm

Re: Assigning a different external ip to each hub.

Post by oliver7011 » Sat Aug 20, 2022 3:57 pm

Thanks for the help. For anyone trying this in the future, ensure that both virtual and secure nat in softether is disabled.

Post Reply