Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I have got a centos 5.5 box with 2 interface (WAN & LAN) and trying to configure firewall so that LAN user can browse XXX.subdomain.com
(where XXX can be anything). nothing else.
this is not a firewalls job. It will deal with IP addressing, and NOT domain names. Not surprising you didn't find anything.
Whilst it is occasionally possible to have firewalling systems that can utilize some elements of DNS, it is not viable to rely on DNS lookups to permit firewall connections as the overhead and latency is vast, and the reliability is poor.
Last edited by acid_kewpie; 06-13-2011 at 05:11 AM.
what do you mean by "browse a domain"? if this is web traffic, then that's what an http proxy is for. Anything else, you need to write more informative and detailed posts about your situation.
OK let me explain, As I told before my linux server contains 2 interface cards eth0 for WAN and eth1 is LAN(10.10.0.0/24), dhcp server is enabled on eth1 interface. Now situation is I want configure the linux server such way that any node inside LAN (for example 10.10.10.254) can only access XXX.subdomain.com. if it want to access say for example www.google.com it will be rejected.
A proxy is the best way for sure.
If you don't care about using the server for other outgoing traffic and "XXX.subdomain.com" has a fixed IP address range (for example "188.40.138.0/24"), you could restrict the traffic with an OUTPUT rule:
Code:
iptables -A OUTPUT -o eth0 ! -d 188.40.138.0/24 -j REJECT
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.