portknocking not work

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
faustf
Level 1
Level 1
Posts: 4
Joined: Thu Apr 27, 2017 7:54 pm

portknocking not work

Post by faustf » Thu Feb 01, 2018 5:12 pm

hi guys i have a little problem with portknocking in port 22
i have a "server 192.168.1.106" with open ssh , i configure iptables like this

Code: Select all

sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5900 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5800 -j ACCEPT
-A INPUT -j DROP
and i follow this tutorial
https://help.ubuntu.com/community/PortKnocking
and i use example 1
in client side i run a command

Code: Select all

 knock -v 192.168.1.106 7000 8000 9000
hitting tcp 192.168.1.106:7000
hitting tcp 192.168.1.106:8000
hitting tcp 192.168.1.106:9000
but after and before a command knock , if i run nmpa i have this answer

Code: Select all

Starting Nmap 6.40 ( http://nmap.org ) at 2018-02-01 21:51 CET
Nmap scan report for 192.168.1.106
Host is up.
All 1000 scanned ports on 192.168.1.106 are filtered

Nmap done: 1 IP address (1 host up) scanned in 201.30 seconds
and obviusly if i try to connect with ssh not connect

the log file is blank

anyone can help me ??? thankz at all

User avatar
catweazel
Level 17
Level 17
Posts: 7562
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: portknocking not work

Post by catweazel » Fri Feb 02, 2018 1:23 am

faustf wrote:port 22
Try port 2200. Ports below 1024 are protected in linux.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Post Reply

Return to “Wireless”