Changeset 1068

Show
Ignore:
Timestamp:
05/24/08 11:47:58 (6 months ago)
Author:
mbr
Message:

Added ENABLE_IPT_LOCAL_NAT variable to control whether connections to local sockets can be NAT'd

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fwknop/trunk/fwknop

    r1065 r1068  
    314314 
    315315if ($verbose) { 
    316     print "[+] Command line: @args_cp\n"; 
     316    print "[+] fwknop Command line: @args_cp\n"; 
    317317} 
    318318 
  • fwknop/trunk/fwknop.conf

    r1064 r1068  
    8484### specific SOURCE stanzas that should be allowed for forwarding access. 
    8585ENABLE_IPT_FORWARDING       N; 
     86 
     87### Allow SPA clients to request access to a local socket via NAT.  This still 
     88### puts an ACCEPT rule into the FWKNOP_INPUT chain, but a different port is 
     89### translated via DNAT rules to the real one.  So, the user would do 
     90### "ssh -p <port>" to access the local service (see the --NAT-local and 
     91### --NAT-rand-port on the fwknop client command line). 
     92ENABLE_IPT_LOCAL_NAT        Y; 
    8693 
    8794### By default, if forwarding access is enabled (see the ENABLE_IPT_FORWARDING 
  • fwknop/trunk/fwknopd

    r1065 r1068  
    266266 
    267267print STDERR localtime() . " [+] ** Starting fwknopd (debug mode) **\n", 
    268     "    Command line: @args_cp\n" if $debug; 
     268    "    fwknopd Command line: @args_cp\n" if $debug; 
    269269 
    270270### setup to run 
     
    43884388    } 
    43894389 
    4390     if ($config{'ENABLE_IPT_FORWARDING'} eq 'Y' or $fw_list or $ipt_flush) { 
     4390    if ($config{'ENABLE_IPT_FORWARDING'} eq 'Y' 
     4391            or $config{'ENABLE_IPT_LOCAL_NAT'} eq 'Y' 
     4392            or $fw_list or $ipt_flush) { 
     4393 
    43914394        ### for the FWKNOP_FORWARD chain 
    43924395        if (&parse_ipt_var(\%ipt_forward, $config{'IPT_FORWARD_ACCESS'})) { 
     
    47774780            IPT_DNAT_ACCESS IPT_SNAT_ACCESS IPT_MASQUERADE_ACCESS BLACKLIST 
    47784781            SNAT_TRANSLATE_IP PROC_IP_FORWARD_FILE ENABLE_PROC_IP_FORWARD 
    4779             MIN_SPA_PKT_LEN 
     4782            MIN_SPA_PKT_LEN ENABLE_IPT_LOCAL_NAT 
    47804783    ) { 
    47814784        die "[*] Required variable $var is not defined in $config_file" 
  • fwknop/trunk/test/conf/blacklist_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 ALL; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/default_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 ALL; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/forward_chain_fwknop.conf

    r1064 r1068  
    2525DIGEST_TYPE                 ALL; 
    2626ENABLE_IPT_FORWARDING       Y; 
     27ENABLE_IPT_LOCAL_NAT        Y; 
    2728ENABLE_IPT_OUTPUT           N; 
    2829ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/md5_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 MD5; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/no_promisc_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 ALL; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/output_chain_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 ALL; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           Y; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/pcap_file_fwknop.conf

    r1064 r1068  
    2525DIGEST_TYPE                 ALL; 
    2626ENABLE_IPT_FORWARDING       N; 
     27ENABLE_IPT_LOCAL_NAT        Y; 
    2728ENABLE_IPT_OUTPUT           N; 
    2829ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/sha1_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 SHA1; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/sha256_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 SHA256; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N; 
  • fwknop/trunk/test/conf/spa_aging_fwknop.conf

    r1064 r1068  
    2626DIGEST_TYPE                 ALL; 
    2727ENABLE_IPT_FORWARDING       N; 
     28ENABLE_IPT_LOCAL_NAT        Y; 
    2829ENABLE_IPT_OUTPUT           N; 
    2930ENABLE_IPT_SNAT             N;