Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i have this idea in my head - but i am not sure if the concept is correct neither if there is a tool that does the job
i have a small network that holds servers for 2 domains:
dev.company.net
company.com
each of these are in their own internal subnet:
dev.company.net => 10.2.1.0/24
company.com => 10.10.0.0/24
what i would like to be able to do: is to redirect the internet traffic through our gateway (linux) accordingly.
so if a user is looking for a webserver on dev.company.net;
just as well a VPN client will.
at the same time similar traffic will exist for the other domain.
so can i do that? i have used webmin in the past to setup iptables but i can not recall on how to setup iptables to redirect traffic depending on which domain is requested - only by their port/services.
It sounds like the idea will work and I believe you are looking for router functionality, which will be based upon IP address, not name. If you can get the routing to work per IP address using the NAT functions of iptables you are well on your way. The second part, based upon domain, will be a function of your DNS and zones, rather than iptables. You will need to configure the authoritative DNS for your LAN to resolve these names into the appropriate address. Then with the routing configured properly, you should be able to point your browser to either site and go to the correct one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.