Quote:
Originally Posted by gglq000
i dont see a single useful stuff or single stuff that i can understand from this reply. Can anyone else do it?
|
lol, I even gave you the relevant section of the manual. So let's see if we can make this really simple.
By default services defined in the /etc/xinetd.d folder will listen on all interfaces.
If there is a "bind" directive in the service config file in the /etc/xinetd.d folder then that service will only listen on the address specified after the = sign in the bind directive.
Using the command:
Code:
netstat -lnp | grep xinet
will show which addresses / ports xinetd is listening on.
For example, this shows xinetd listening on port 2222 on all the interfaces on this server (which has two NICs, one external and one internal that has two IPs assigned to it).
Code:
# netstat -lnp | grep xinet
tcp 0 0 :::2222 :::* LISTEN 30888/xinetd
If I place a
bind = 10.10.101.101 directive in the config file for the service in the /etc/xinet.d folder and restarting xinetd I can bind the service to one of the two private IPs:
Code:
# netstat -lnp | grep xinet
tcp 0 0 10.10.101.101:2222 0.0.0.0:* LISTEN 31664/xinetd
If I
make a copy of the config file in /etc/xinet.d and give it a different bind directive, such as
bind = 10.10.101.1 I can restart xinetd and bind the service to the additional private IP address.
Code:
# netstat -lnp | grep xinet
tcp 0 0 10.10.101.101:2222 0.0.0.0:* LISTEN 31958/xinetd
tcp 0 0 10.10.101.1:2222 0.0.0.0:* LISTEN 31958/xinetd