Bind services to a specified IP is very important because you will only have one single loopback net device and this loopback device will normally be used to run services at host. For guest server, you can only bind to virtual LAN's IP that describe at the previous topic.
Therefore , each single VLAN is advised to serve a single guest servers for easy management.
i will explain how will this can be done. i will assume our vlan ip is 192.168.2.201
we edit the file /etc/ssh/sshd_config Locate
#ListenAddress 0.0.0.0
replace
ListenAddress 192.168.2.201
Debian :
edit the file /etc/apache2/ports.conf
Listen 80
replace
Listen 192.168.2.201:80
edit the file /etc/mysql/my.cnf
bind-address = 127.0.0.1
replace
bind-address = 192.168.2.201
Locate file /etc/postgresql/7.4/main/postgresql.conf
#virtual_host='' port = 5434 #tcpip_socket = true
replace
virtual_host='192.168.1.201' port = 5434 tcpip_socket = true
Locate file - /etc/postgresql/8.3/main/postgresql.conf
#listen_addresses = 'localhost' port = 5434
replace
listen_addresses = '192.168.2.201' port = 5434
Locate file - /etc/postfix/master.cf
#smtp inet n - - - - smtpd
replace
192.168.2.201:smtp inet n - - - - smtpd
Locate file - /etc/dovecot/dovecot.conf
#listen = *
replace
listen=192.168.2.201
Locate file - /etc/squid/squid.conf
#http_port :3128
replace
http_port 192.168.2.201:3128
Locate file - /etc/webmin/miniserv.conf
add it at last line
bind=192.168.2.201
Locate file - /etc/vsftpd.conf
add it at last line
listen_address=192.168.2.201
Try to following command to ensure all the services are bind to the correct address
# netstat -lnp |grep 192.168.2.201 tcp 0 0 192.168.2.201:3306 0.0.0.0:* LISTEN 4500/mysqld tcp 0 0 192.168.2.201:80 0.0.0.0:* LISTEN 4374/apache2 tcp 0 0 192.168.2.201:22 0.0.0.0:* LISTEN 4755/sshd tcp 0 0 192.168.2.201:5434 0.0.0.0:* LISTEN 4600/postmaster
well, we can also test our loopback device
# netstat -lnp |grep 127.0.0.1 tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3487/named tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 3487/named udp 0 0 127.0.0.1:53 0.0.0.0:* 3487/named