Code:
But how can you set-up the gateway to forward the external packets to the right internal IP
you can have as following
Public 202.100.100.100 openport 80 fwd to (A Server)
(A Server) Internal 192.168.1.10 openport 80
(B server) Internal 192.168.1.100 openport 80
where is now apache rewrite code come into the picture
which is need to be configured inside (A Server )
this is the sample in (A Server )
Code:
<VirtualHost *:80>
ServerName b.server.com.au
RewriteEngine On
RewriteRule ^(.*)$ http://b.server.com.au/$1 [P]
UseCanonicalName On
RewriteRule ^(.*)$ [L]
</VirtualHost>
...............................................
.
# note:-
# /etc/hosts must have this line "192.168.1.100 b.server.com.au" LAN Server
# which is
http://b.server.com.au is located on the server 192.168.1.100
last setup all domain to point to your public ip address
you can have many more internal server all open with same port and can be access from external with diffrent domain if you this rewritecode