Changeset 1098
- Timestamp:
- 05/31/08 11:58:00 (6 months ago)
- Files:
-
- fwknop/trunk/ChangeLog (modified) (2 diffs)
- fwknop/trunk/fwknop (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fwknop/trunk/ChangeLog
r1082 r1098 28 28 Now the fwknop client will select a random port to NAT the incoming 29 29 connection. So say it selects port 31001 (as indicated by the output of 30 fwknop on the command line) - then you would SSH to this port to access 31 the real SSH daemon on the system where fwknopd is running: 30 fwknop on the command line as displayed below) - then you would SSH to 31 this port to access the real SSH daemon on the system where fwknopd is 32 running: 33 34 [+] Sending 206 byte message to 127.0.0.1 over udp/46245... 35 Requesting NAT access to tcp/22 on 127.0.0.1 via port 31001 32 36 33 37 $ ssh -p 31001 <user>@11.1.1.1 … … 52 56 This allows fwknopd to ignore packets that are not at least this many 53 57 bytes (including packet headers) before any decryption attempt is made. 58 - Added --time-offset-plus and --time-offset-minus args to the fwknop 59 client command line. This allows the time stamp within an SPA packet to 60 be influenced without setting the system clock (which normal users 61 cannot usually do). This is useful for when the client and server 62 systems have clocks that are out of sync. 54 63 - Updated to version 5.47 of the Digest::SHA module. 55 64 - Updated to version 0.7 of the IPTables::ChainMgr module (includes fwknop/trunk/fwknop
r1092 r1098 75 75 my $show_last_host_cmd = ''; 76 76 my $show_last_cmd = 0; 77 my $time_offset_plus = ''; 78 my $time_offset_minus = ''; 77 79 my $use_md5 = 0; 78 80 my $use_sha1 = 0; … … 531 533 sub SPA_timestamp() { 532 534 my $timestamp = time(); 535 536 537 if ($time_offset_plus) { 538 my $offset = &time_offset($time_offset_plus); 539 $timestamp += $offset; 540 } 541 542 if ($time_offset_minus) { 543 my $offset = &time_offset($time_offset_minus); 544 $timestamp -= $offset; 545 } 546 533 547 print " Timestamp: $timestamp\n" unless $quiet; 534 548 return ':' . $timestamp; … … 1443 1457 'knock-dst=s' => \$knock_dst, 1444 1458 'Destination=s' => \$knock_dst, 1459 'time-offset-plus=s' => \$time_offset_plus, 1460 'time-offset-minus=s' => \$time_offset_minus, 1445 1461 'gpg-signing-key=s' => \$gpg_signing_key, 1446 1462 'gpg-recipient=s' => \$gpg_recipient, … … 1620 1636 } 1621 1637 return; 1638 } 1639 1640 sub time_offset() { 1641 my $str = shift; 1642 my $offset = 0; 1643 1644 if ($str =~ /(\d+)/) { 1645 $offset = $1; 1646 } else { 1647 die "[*] Must specify a value like 60min"; 1648 } 1649 if ($str =~ /min/i) { 1650 $offset *= 60; 1651 } elsif ($str =~ /hour/i) { 1652 $offset *= 60 * 60; 1653 } elsif ($str =~ /day/i) { 1654 $offset *= 60 * 60 * 24; 1655 } elsif ($str =~ /sec/i) { 1656 ### no action 1657 } else { 1658 ### default to minutes 1659 $offset *= 60; 1660 } 1661 return $offset; 1622 1662 } 1623 1663 … … 1775 1815 --get-key <file> - Get encryption key from <file> instead of 1776 1816 from STDIN. 1817 --Test-mode - Build SPA packet data but do not send it 1818 over the network. 1819 --time-offset-plus <str> - Add a time offset to the advertised time 1820 stamp in the SPA packet (e.g. "60sec" or 1821 "1day"). 1822 --time-offset-minus <str> - Subtract a time offset from the advertised 1823 time stamp in the SPA packet (e.g. "60sec" 1824 or "1day"). 1777 1825 --TCP-sock - Send SPA packets over an established TCP 1778 1826 socket with the fwknopd server. This … … 1790 1838 -H, --Home-dir <directory> - Specify the home directory of the current 1791 1839 user that is running fwknop. 1792 -t, --time-delay <seconds> - Introduce a time delay between each 1793 connection in a knock sequence. This is 1794 mainly used in conjunction with the 1795 MIN_TIME_DIFF access control directive. 1840 --time-delay <seconds> - (Legacy port knocking mode) Introduce a 1841 time delay between each connection in a 1842 knock sequence. This is mainly used in 1843 conjunction with the MIN_TIME_DIFF access 1844 control directive. 1796 1845 -k, --knock-dst <IP> - Connection destination IP address for port 1797 1846 knock sequence (synonym for -D). 1798 --Test-mode - Build SPA packet data but do not send it1799 over the network.1800 1847 -d, --debug - Run fwknop in debugging mode. 1801 1848 -v, --verbose - Verbose mode.
