0

I am configuring a Squid server that has an additional /24 block of IP. However that provider gave me an IP block that has a different subnet from my server.

I have read up on interface aliases that allows you to add multiple IP addresses to a single NIC.

May I know if I could do the same if that IP block is of a different subnet than my server? Or how do people usually go about doing this?

2 Answers2

0

You can add multiple addresses to a server, regardless of whether the addresses are all in the same subnet as your server’s ‘main’ IP address.

However, for this to be useful, there needs to be a route for traffic on those additional subnets to reach your server, e.g. tagged network VLANs configured on the switch, or whatever.

Rob Moir
  • 31,884
  • 6
  • 58
  • 89
  • Thanks for the reply! So if the provider does the tagged network VLANs with an IP say x.x.x.1 as the gateway, I would be able to create interface on my Ubuntu using those IP with x.x.x.1 as the gateway to connect to the internet? – multipleip Mar 04 '19 at 07:25
0

You can let your squid proxy with whatever IP it has and NAT all outgoing traffic with the IP addresses your provider gave you