Vodafone Broadband for Email Servers

This is one of those posts that is incredibly bespoke, but it took a long time on the phone to tech support to get sorted.

First thing to know is the types of service that vodafone provide and in particular the type of service that you will require in order to get your email server running correctly.

The problem on paper is a rather simple one in that in order to improve deliverability of emails your server requires a reverse dns (rDNS) record.  This record can only be set up by your internet service provider.  Whoever your ISP is, getting them to set up a reverse DNS record can prove challenging to say the least, but with Vodafone it is a little more challenging than most.

Vodafone currently provide a number of different packages and addons but the package that you need is a Vodafone Multi IP package.  Unlike all other providers I have encountered a regular single static IP will not suffice.

So once you have Vodafone Multi IP if you are using a Vodafone router then all you need to do is set up the router and your server.

 

Setting up the router

The basic muti ip packages gives you 8 IP addresses (albeit only 6 are useable).  Vodafone should let you know what block of ip addresses have been assiged and how many so that you can determine the subnet.  I found that I had to contact them to get this information.

First thing to do is make sure that your connection is working.  If it does not say “online” on  the home page then you nothing will work.

You may note that your router has a public IP address that is not part of your assigned block.  This is absolutely fine and nothing to worry about just as long as a connection is established.  With Vodafone routers it is not possible to set credentials so if you have not got a working connection then you will need to contact them first.

If you can log on to the router’s wifi and connect to the internet then you can proceed to the multi ip setup.

 

Multi IP setup

From the drop down list in the top right hand corner select “Expert Mode” then navigate to “Settings” on the red header bar and select “Public Subnet” from the menu on the left hand side.

You will note a field named CPE IPv4 Address.  This is where you enter the first address of the block that you were assigned.  Mine first one ended in 97

xxx.xxx.xxx.97

Now set your subnet.

NOTE:  If you have been assigned 8 IP addresses then this will always be

255.555.255.248

Now apply and save.  You will note that the third field set entitled Subnet ID will now automatically be populated with the broadcast address.

 

Optional (DHCP)

If you just want to enable dhcp to assign your public addresses then you can do that simply by flipping the switch “DHCPv4 Server” and applying.   Your servers will thin be assigned an address of the router’s choosing.

I would assume that each address is automatically bound to a MAC address, but that is not clear and not documented so I configured mine statically on our servers.

 

Connecting your server up

At this point the ports on your Vodafone router are all public so you should connect one of the ports directly to a spare port on your server (this will become your WAN port); set up your interface and you are done.

 

Server Public IP (Configured on your server)

If you are allowing the router to assign IP addresses then simply ensure that you your interface is set to dhcp in your /etc/network/interfaces file (In this example the port I am using for my WAN is “eno2“).

auto eno2
iface eno2 inet dhcp

and that is it.

Personally I do not trust that the router will assign the same IP on reboot and eve if it does, at some point if the router is to be replaced then the next one will probably not so I prefer to configure a static.  To do so it is pretty standard stuff.

iface eno2 inet static
        address xxx.xxx.xxx.100
        netmask 255.255.255.0
        broadcast xxx.xxx.xxx.255
        post-up route add default gw xxx.xxx.xxx.97 metric 1
        post-down route del default gw xxx.xxx.xxx.97

You will note that the gateway xxx.xxx.xxx.97 if the first address in the block.  xxx.xxx.xxx.100 is the the public IP address that I decided to assign to this server.

Use ip link set up eno2 or ifup eno2 to bring the interface up.  You can check the route is set with ip route.   and check the “default” route points to your gateway IP above.

This will get your server connected to the internet but any ports that are open on your server will be accessible from the internet and unless you have another route you will not be able to connect to the internet through client computers.

In order to resolve these final problems we configure forwarding and use iptables to set up a firewall and turn the server into a router.  This is detailed in another post.

 

Setting up your reverse DNS

At this point you can email ipadmin@vodafone.com and tell them the domain name and the IP address that you wish it to resolve to.  They should then set up your rDNS record for you.  You may have to contact them a few times or you might have to contact technical support but they will respond eventually if you nag them enough.