How to Stop a service on one particular interface
We have a single linux box will be shared as a server for multiple testbeds. We had decided to achieve this by assigning different interfaces for each testbed.
Now, we have a few scripts which requires to stop the services (like HTTP, DNS etc) running in the server. But this would affect the test running in other testbed (since they are using the same server).
I am looking for a way by which the service has to be running, at the same time it should not respond to traffic coming from one particular interface (i.e when the script runs in testbed A, it should look as if the service is not running, but in reality the service should be running and giving responses to other testbeds B,C,D etc)
The one option that we thought was using an IPTables and dropping the response from the service in the interface which is assigned to the testbed, but this would mean that we may need to build a RST packet ourself and send back to the requestor. We are not aware of that.
Please let me know if there is some other way by which this can be done.
Thanks
Vazir
|