I have 2 Servers A and B
Server A has 1 Public ip address xx.xx.xx.1
Server B has public ip addresses yy.yy.yy.0 /27
I need to create a private network on Server A 10.0.0.0 /27
and tunnel email traffic from Server A out through xx.xx.xx.1
to the 'corresponding' public IP on Server B
For instance: I make an outgoing email connection on Server A to 10.0.0.1
The connection is then tunneled out of Server A's public IP xx.xx.xx.1 to
Server B's public IP [url removed, login to view] connects to a server in the outside world.
Any incoming connection/response back made to yy.yy.yy.1 from the outside world is then
tunneled back through xx.xx.xx.1 to 10.0.0.1 on Server A.
An example of this is shown here:
[url removed, login to view]
For this project you will need to make bash configuration scripts for both Server A and B
to setup the tunnels. The scripts should open the firewalls as necessary on Server A and B and also make the tunnels persistent in case of a reboot on server A or B. IE: in case of reboot, a bash script should be executed automatically that brings the tunnels back to life
The bash script for Server A should parse a setup file that contains the following:
Line 1: the public ip address to be used (xx.xx.xx.1 for the example above)
Line 2: the CIDR of the private network to setup and use (10.0.0.0 /27 for the example above)
Line 3: the CIDR of the public IPS on Server B to tunnel out to (yy.yy.yy.0 /27 for the example above)
The bash script for Server B should parse a setup file that contains the following:
Line 1: The Public IP of Server A (xx.xx.xx.1 in example above)
Line 2: the CIDR of the public IPs on Server B that will be used as tunnels (yy.yy.yy.0 /27 in the example above)
If I am missing anything or you need clarification please let me know. This is part of an ongoing project which requires bash, php, and mysql mostly so I would prefer working with a coder fluent in all 3.