I want to SSH to Server from my machine, my ip was

Source Destination was UP, with IP

This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's cos i need to apply the same rules in Production VPS

I have applied the below iptables in my machine, Now i can't receive any packets from Outside and i can't send any packets Outside, While applying the Below Chain

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

After the above CHAIN i have added the Below rules and it want to allow ssh from machine to to access the but still i can't access

iptables -A INPUT -p tcp -i eth0 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -o eth0 --sport 22 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT

Any one Please Check Weather my Rules are Wrigt. Still i can't access the machine 15


The rules for iptables are applied in order and the first matching rule is applied. You therefore need to insert the rules to allow traffic before the rules that drop all traffic.

  • Solved by replacing the eth0 to br0, cos in my desktop there is bridge so i have to replace it with br0 Jun 4 '14 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.