LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2005, 12:27 PM   #1
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Rep: Reputation: 30
disable internet access to server


Hi All,

I currently have a small server on my lan. I have a few XP boxes and a FC3 server for files. All machines are behind a Linksys router. Is there a way to disable internet access to the server, but still be available to the LAN?
 
Old 06-24-2005, 12:49 PM   #2
azucaro
Member
 
Registered: Jan 2005
Location: Washington, D.C.
Distribution: Arch (Custom), CentOS
Posts: 239

Rep: Reputation: 30
What kind of server are you talking about? FTP, HTTP, Samba?
 
Old 06-24-2005, 01:43 PM   #3
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
Just a samba server. I want it to only see and communicate with the LAN clients and not the outside world at all. Basically, I want it to only think the LAN computers are the only ones that exist. Is this a perfect scenario for Iptables?
 
Old 06-24-2005, 02:11 PM   #4
SirGertrude
Member
 
Registered: May 2004
Location: Missouri
Distribution: Gentoo
Posts: 59

Rep: Reputation: 15
Yes, iptables would work great for this. You need a rule that will drop all packets destined for a network other than that of your internal LAN.

Try this:

Assuming your internal network is 192.168.1.0/24

Code:
iptables -I OUTPUT 1 ! -d 192.168.1.0/24 -j DROP
This will drop any packet leaving the server that is not destined for an IP address located on your LAN. Since you are already behind a router you won't need to worry about incoming traffic.

I hope this helps!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
config squid so some IP can access internet, and others just the server? 4mix Linux - Networking 5 07-20-2004 05:08 PM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
Internet Access via Server louisb Linux - Security 3 01-09-2004 10:46 PM
client cannot access internet via server justwantin Linux - Networking 2 08-17-2003 12:32 AM
Network access OK but server cannot use internet gkhewitt Linux - Networking 6 08-04-2003 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration