LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-05-2007, 10:36 AM   #1
ComputerHermit_
LQ Newbie
 
Registered: Feb 2007
Distribution: Ubuntu 7.10 Mint 4.0
Posts: 23

Rep: Reputation: 15
iptables fowarding


Hi everyone I'm a bit confused I been reading about iptables and ip fowarding. What I'm confused about is. If I turn on ip fowarding will my computer act like a router? If I turn off ip fowarding will it not act like a router?
 
Old 08-05-2007, 11:00 AM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Enabling ip forwarding will allow data on the internal set nic to send its data to the wan outside nic if that is its required destiantion. But will not allow outsdie connections to internal machines on the other nic unless other rules are added. So in essence you get the very basics of a store bought router but add needed rules to block all ports on the wan nic unless they are needed open.

Brian
 
Old 08-05-2007, 11:00 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, ip forwarding *is* routing, i.e. forwarding a packet when it is not intended for ip addresses held locally to that machine. there is more to it than just that when done correctly, but that does essentially make it a router.
 
Old 08-05-2007, 11:18 AM   #4
ComputerHermit_
LQ Newbie
 
Registered: Feb 2007
Distribution: Ubuntu 7.10 Mint 4.0
Posts: 23

Original Poster
Rep: Reputation: 15
Thank's guy's for your quick reply. This is the other thing that I'm confused about. Let me explane in the town I live in we have free wireless bubbles and being poor as me this is a good thing anyway I have to block some people mac addresses from my computer.

Now will their computer still be able to browse the Internet on the router even though I block them off of my computer? To my knolage they should but I need better input this is why I did not want my computer to act like a router.
 
Old 08-05-2007, 12:00 PM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by ComputerHermit_
Thank's guy's for your quick reply. This is the other thing that I'm confused about. Let me explane in the town I live in we have free wireless bubbles and being poor as me this is a good thing anyway I have to block some people mac addresses from my computer.
Is your computer the router too? And also, why are these people not blocked from your computer in the first place? Are you running services on it?

Quote:
Now will their computer still be able to browse the Internet on the router even though I block them off of my computer? To my knolage they should but I need better input this is why I did not want my computer to act like a router.
If your computer is the router, then blocking connections from the clients to the router will not affect the connections they can make through the router. It's two separate issues (INPUT vs. FORWARD chains).
 
Old 08-05-2007, 12:51 PM   #6
ComputerHermit_
LQ Newbie
 
Registered: Feb 2007
Distribution: Ubuntu 7.10 Mint 4.0
Posts: 23

Original Poster
Rep: Reputation: 15
win32sux thanks
my computer is not the router I know this after asking here my computer has no
services on it but some of the other people computer's have the ms browser service running. Them computers I block thanks again.
 
Old 08-06-2007, 01:20 AM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by ComputerHermit_
win32sux thanks
my computer is not the router I know this after asking here my computer has no
services on it but some of the other people computer's have the ms browser service running. Them computers I block thanks again.
In that case just block all incoming connections to your computer - not just from some MACs. MACs can be easily spoofed, making your rules completely ineffective. Besides, blocking all non-necessary incoming connections is a good idea either way. Here's the basic commands for this (assuming you have not changed the default iptables settings yet):
Code:
iptables -P INPUT DROP
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
You should probably do some reading-up on iptables and stuff, depending on how much sense the above commands make to you. A good place to start is Wikipedia. There's some good links at the bottom of the page.
 
Old 08-06-2007, 12:32 PM   #8
ComputerHermit_
LQ Newbie
 
Registered: Feb 2007
Distribution: Ubuntu 7.10 Mint 4.0
Posts: 23

Original Poster
Rep: Reputation: 15
win32sux
Thanks I have been reading up on iptables I understanding it a bit better then I did thanks alot I was trying to look for info. On useing iptables to stop or filter arp request. From computers on the wrieless network and comeing in to this computer. Any idea's?
 
  


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
help port fowarding bailey239 Linux - Networking 9 07-22-2007 03:08 PM
port fowarding georgel12 Linux - Networking 2 05-16-2006 06:38 PM
Port Fowarding zaicheke *BSD 9 10-25-2004 06:05 PM
Fowarding Ports BugBear Linux - Networking 2 05-22-2004 01:18 AM
X11 fowarding Atlas337 Linux - Software 2 08-10-2002 09:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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