LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-22-2011, 12:17 PM   #1
gnarliprime
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
IPtables Rules


Hey I'm trying to set up my iptables, but am kind of unsure what the syntax for the commands would be. I have been reading the iptables -h, but still havent gottent it. I use ddwrt on 2 routers, separated the wlan from the lan to 2 subnets. Now, I'm trying to set up my iptables to say that wlan can only connect to lan and nothing else, through udp&tcp 1516-2056. In addition, I need wan ssh to go all the way through to the computers set on the lan subnet. Lastly, the lan subnet needs to have outbound access to the internet.
So for wan
ssh -> accept
accept all <-
deny all ->

wlan
1516-2056 <-> lan subnet
deny all <->

lan
Accept -> 1516
accept <-

Does this make any sense? Is there a good guide on how to do this? Thanks
b.rake
 
Old 01-24-2011, 10:28 AM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by gnarliprime View Post
Is there a good guide on how to do this? Thanks
b.rake
Sorry about not (yet?) taking the rest of your question seriously, but as the answer to this part is yes, I thought that I'd throw this part of the answer at you, and see where we go from there.

http://iptables-tutorial.frozentux.net/
http://www.linuxhomenetworking.com/w...Using_iptables
http://www.yolinux.com/TUTORIALS/Lin...rkGateway.html


that link at 'frozentux' has what is effectively a manual for iptables. It is available in several forms, and I would suggest that you download something that you can read. The linuxhomenetworking is probably better on the 'networking context' for firewalling. The Yolinux one is probably the best 'quick 'n dirty, get something working' link.

I hope this has been the 'teach a man to fish' guide.
 
  


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
Restore iptables Rules that have been saved with iptables-save tiuz Linux - Security 4 08-14-2010 05:50 PM
About iptables rules satimis Linux - Security 11 08-27-2007 04:50 AM
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
iptables rules hazza96 Linux - Security 3 09-09-2001 11:16 AM

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

All times are GMT -5. The time now is 09:43 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