limiting ssh access to router/firewall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Im having problems with limiting ssh access to my router, it acts like a 
router and a firewall, and i need only my office ip able to connect to the 
router.
All my other rules works just fine(FORWARD).. im probarly just got the INPUT 
command messed up..

This is some of my firewall script.

iptables -F
iptables -X
iptables -Z

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

iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT


# SSH access router
iptables -A INPUT -i eth0 -s ! "my office ip" -d "router ip" -p tcp --dport 22 
-j DROP


...servers...

If I use this script I loose ssh access from my office ip, how can i do this 
right?

If you got any suggestions pls help, thanks


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux