LinuxQuestions.org
Visit Jeremy's Blog.
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 09-16-2014, 06:00 AM   #1
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Rep: Reputation: 2
Does -o and -i make sense on these rules?


Code:
iptables -A FORWARD -s 192.168.20.7 -d 10.10.48.3 -p tcp --dport 25 -o eth1 -j ACCEPT
iptables -A FORWARD -s 10.10.48.3 -d 192.168.20.7 -p tcp --sport 25 -i eth1 -j ACCEPT
Tuning the firewall of my organization I found these two lines which confuse me. The eth1 interface is connected to the 10.10.x.x network and eth0 to 192.168.x.x, so... does it make sense to put the -o eth1 and the -i eth1 if that is already implied by the -d 10.10.48.3 and -s 10.10.48.3, respectively?

Last edited by yzT!; 09-16-2014 at 07:57 AM.
 
Old 09-22-2014, 02:45 AM   #2
GunFighT
Member
 
Registered: May 2014
Location: Romania
Distribution: Debian/Ubuntu, Rocky Linux
Posts: 53

Rep: Reputation: Disabled
In the 1st rulle:
"-o" parameter, tells that from -s (source IP/subnet) goes to -d (destination IP), on eth1. The "-o" is like a output rulle. Forces all traffic from source IP to destination IP, to go on eth1.
 
Old 09-22-2014, 03:32 AM   #3
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
yzTi, it is not require in this case.
 
  


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
Does this make sense? Linux_Kidd Linux - Networking 3 05-31-2013 08:03 AM
What sense does this make (Javascript)? resetreset Programming 3 12-04-2010 12:16 AM
How does this make sense? Trinity22 Linux - General 2 03-30-2005 12:45 AM
Ya sure this make sense Edward78 General 2 09-23-2003 03:00 PM
Wine Friggin Rules! But this makes no sense... Bigun Linux - General 4 10-28-2002 10:42 AM

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

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