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 need a rule for my IPTABLE for three way hand shack method. Example in a datail.
Code:
1-Host A sends a TCP SYNchronize packet to Host B
2-Host B receives A's SYN
3-Host B sends a SYNchronize-ACKnowledgement
4-Host A receives B's SYN-ACK
5-Host A sends ACKnowledge
6-Host B receives ACK.
TCP socket connection is ESTABLISHED
well by this step a normal user can understand how two computers communicate each others.Please can u help me that how can I write a rule using iptables for three way Hand shack.
Thanks "kaushalpatel" for the reply. Well can we break the IP table in more comprehensive way like as following
Code:
PC A to PB B
1- # iptables -A INPUT -sA -dB -m state --state NEW -j ACCEPT i.e PC A connect to PC B.
2- # iptables -A INPUT -sB -dA -m state --state RELETED -j APPEPT i.ePC B send Sync and Acknow to PC A.
3- # iptables -A INPUT -sA -dB -m state --state ESTABLISH -J accept i.e connection establishPC B to PB A
4- # iptables -A INPUT -sB -dA -m state --state NEW -j ACCEPT
5- # iptables -A INPUT -sA -dB -m state --state RELETED -j APPEPT
6- # iptables -A INPUT -sB -dA -m state --state ESTABLISH -J accept
is it correct ?
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166
Rep:
FYI, Number of rules will add delay in the packet transitions. It also add headache for management when the scenarios is wide. In linux I follow the rule "KISS".
gardenair, you might want to read up on the RELATED match, because it doesn't do what you seem to think it does. In fact, the RELATED match isn't even necessary for what you have outlined. Example:
Code:
iptables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
iptables -A FORWARD -s $HOST_A -d $HOST_B -m state --state NEW -j ACCEPT
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.