• Slightly Confused–> Outbound FTP via VIP

    Locked
    8
    0 Votes
    8 Posts
    4k Views
    S
    I'm currently running 3-15-2007, but I will upgrade to the latest after I test a little bit. Thanks! Scott
  • CARP and Squid?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    S
    Doesn't matter either way.  SQUID is a userland proxy and as soon as you fail over to the second host no matter what the application state is lost and any states will be lost. So basically even if it did use the correct WAN/CARP IP the situation would not change on fail over.
  • 1:1 NAT and Multiple Public IPs

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    M
    I had same problem, to map multiple WAN IP's to internal LAN/DMZ IPs. Example: 212.xx.xx.xx => 10.xx.xx.xx First I make Virtual IPs for every of my external IP (212.xx.xx.xx.) but it was not possible to use NAT 1:1 settings! You have to use "NAT Port Forward" insted. In the "External address" drop down you will see all your Virtual IPs and you can easy map them to your internal IPs and choose desired ports/ranges.
  • Problem with pfSync

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Virtual IP problem…

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    C
    Finally I did what I want… :) 1 - I've created a vip (proxyarp). 2 - I've added a 1:1 nat for my LAN ip for vip 3 - I've added a port-forward for My LAN ip for ports 1-65500 Now it work properly... But I couldn't solve high traffic on carp vips. ???
  • Carp sync issue with load balancing

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    R
    Looks like some people have read my post, but no response, also the ticket has not been touched…. Here is the link to the ticket http://cvstrac.pfsense.com/tktview?tn=1262.  Will someone acknowledge this?
  • CARP - IPSEC - failover - listen (500) in racoon.conf

    Locked
    8
    0 Votes
    8 Posts
    5k Views
    H
    Hello Scott, maybe later. It doesn't greatly matter. Greetings from Germany and special thanks for your help. Heiko
  • Setting up CARP cluster for LAN and WAN VIPs at the same time

    Locked
    15
    0 Votes
    15 Posts
    7k Views
    H
    danke, jetzt habe ich es gruß heiko
  • Just a question about carp and vlans

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    H
    Should work.
  • VIP for LAN shows BACKUP status on both servers

    Locked
    9
    0 Votes
    9 Posts
    5k Views
    H
    CARP is mainly broadcastingtraffic. Have a look at http://www.countersiege.com/doc/pfsync-carp/ to see how it works.
  • 2 of 3 CARP VIP's work

    Locked
    7
    0 Votes
    7 Posts
    5k Views
    H
    Correc t, you need first a virtual IP to add 1:1 mappings (at least if we are not talking abou the real wan interface IP). On top of that you need firewallrules to let the desired traffic pass of course.
  • CARP Preemption in RELENG_1 Snapshots

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    H
    Thanks a lot Heiko
  • Dynamic DNS doesn't work with Dual Wan

    Locked
    9
    0 Votes
    9 Posts
    19k Views
    T
    I'm not a fulltime programmer so I don't think like a geek.  I just made it work for my case.  If it's usefull, please feel free to use it.  I will be very happy if I know that it's intergrated into pfsense.  I can sleep with a happy face  :) The three main files that I modified are: filter.inc, dyndns.class, and pfsense-utils.inc  (see attached files).  As always, diff is really useful to checkout the differences.  It's not much coding, here are all of my codes & modifications: // / File: /etc/inc/filter.inc                                                                    / / At the end of the function filter_configure_sync add                            / / the new wan_monitor() function in                                                    / // /* reload filter sync / function filter_configure_sync() {   …         / sync carp entries to other firewalls */         update_filter_reload_status("Syncing CARP data");         carp_sync_client(); /* WAN monitoring */         wan_monitor(); update_filter_reload_status("Done"); return 0; } function wan_monitor() {         global $config;         $failure = 0;         update_filter_reload_status("Debug: WAN Monitoring"); foreach ($config['filter']['rule'] as $rule) {                 if ($rule['gateway'] <> "") {                         $rulegw = $rule['gateway'];                 }         } foreach($config['load_balancer']['lbpool'] as $lb) {                 $poolname = $lb['name'];                 $servers = $lb['servers']; if ($poolname == $rulegw) {                         if($lb['behaviour'] == "failover") {                                 $routeto = exec("cat /tmp/rules.debug | grep route-to | cut -d '(' -f2 | cut -d ')' -f1 | /usr/bin/sed -e 's/^ //g'");                                 list($int, $gateway) = split(" ", $routeto); $default_route = exec("netstat -rn | grep default | awk '{print $2, $6}'");                                 list($default_gw, $default_int) = split(" ", $default_route); if ($default_gw != $gateway && $gateway <> "" ) { $wan1_gw = $config['interfaces']['wan']['gateway'];                                         list($int_name, $monIP) = split("|", $servers[0]); /* Double check by ping to the host monitor IP 3 times */                                         for ($i = 1; $i <= 3; $i++) {                                                 $pingstatus = exec("/sbin/ping -c 1 -t 2 -q -Q $monIP | grep 'packet loss' | cut -d ',' -f3 | /usr/bin/sed -e 's/^ //g' | cut -d '%' -f1"); if ($pingstatus == 100) {                                                         $failure++;                                                 }                                                 sleep (5);                                         } /* If total failure is 3 times, then switch the default route /                                         if ($failure == 3) {                                                 $switchroute = 1;                                         }                                         / Switch back to WAN1 if the host monitor IP is pingable /                                         / and the default gateway is on WAN2                    */                                         else if ($failure == 0 && $default_gw != $wan1_gw) {                                                 $switchroute = 1;                                         }                                         else {                                                 $switchroute = 0;                                         } update_filter_reload_status("Debug: Switch Route = $switchroute");                                         update_filter_reload_status("Debug: Total Failure time = $failure");                                 }                                 else {                                         update_filter_reload_status("Debug: Do nothing. Same route");                                 } if ($switchroute == 1) {                                         update_filter_reload_status("Debug: Changing the default gateway to $gateway");                                         exec("/sbin/route delete default");                                         exec("/sbin/route add default $gateway"); update_filter_reload_status("Debug: Sending email notification");                                         $hostname = exec("hostname");                                         $subject = "$hostname has switched the default gateway to $gateway";                                         $msg = "This is an automate email notification that the default gateway has switched over to ";                                         $msg .= "$gateway\n";                                         $to = "email@company.com";                                         exec("/usr/local/bin/php /root/my-scripts/phpmailer/smtp.php "$subject" "$msg" $to");                                 } $is_carp_enable = get_carp_status(); if ($is_carp_enable == 1) {                                         foreach($config['virtualip']['vip'] as $carp) {                                                 if ($carp['mode'] != "carp") continue;                                                 $ipaddress = $carp['subnet'];                                                 $carp_int = find_carp_interface($ipaddress);                                                 $carp_status = get_carp_interface_status($carp_int);                                                 update_filter_reload_status("Debug: $carp_status");                                         }                                 } if ($carp_status == "MASTER") {                                         update_filter_reload_status("Debug: Updating with DynDNS");                                         exec("/etc/rc.dyndns.update");                                 }                                 update_filter_reload_status("Debug: End");                         }                 }         } } // / File: /etc/inc/dyndns.class                                                              / / Replace $wan_ip to use $this->_checkip() function to                          / / get the real WAN IP to use with Dyndns                                            / // if(!$wan_ip)                                 $wan_ip = $this->_checkip(); function _checkip() { //log_error("DynDns: Running _checkip() for real WAN IP"); exec("/usr/bin/netstat -rn | grep carp | awk '{print $1, $6}'", $getcarp); list($gwip, $gwint) = split(" ", /usr/bin/netstat -rn | grep default | awk '{print $2, $6}');                         $gwip = str_replace("\n", "", $gwip);                         $gwint = str_replace("\n", "", $gwint); if ($getcarp[0] <> "") {                                 foreach ($getcarp as $carpinfo) { list($carpip, $carpname) = split(" ", $carpinfo); $carp_int = $this->_getcarp_int($carpip); if ($gwint == "$carp_int") {                                                 $match = exec("echo $carpinfo | grep $carpname");                                                 list($gwvip, $gwcarp) = split(" ", $match);                                                 $ip = $gwvip;                                         }                                 }                         }                         else {                                 $ch = curl_init();                                 curl_setopt($ch, CURLOPT_URL, 'http://checkip.dyndns.com');                                 curl_setopt($ch, CURLOPT_HEADER, 0);                                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $data = curl_exec($ch);                                 curl_close($ch); list($part1, $part2) = split(': ', $data, 2);                                 list($ip, $junk) = split('<', $part2);                         }                         return $ip;                 }                 /* End of function */ function _getcarp_int($carpip) { global $config; foreach($config['virtualip']['vip'] as $vip) { if ($vip['subnet'] == "$carpip") {                                         $int_name = $vip['interface'];                                         $int = convert_friendly_interface_to_real_interface_name($int_name);                                 } }                         return $int;                 } /*                 * Private Function (added 12 July 05) [beta]                 *  - Detect whether or not IP needs to be updated.                 *      | Written Specifically for pfSense (pfsense.com) may                 *      | work with other systems. pfSense base is FreeBSD.                 */                 function _detectChange() {                         global $config;                         log_error("DynDns: _detectChange() starting."); $currentTime = time(); $wan_ip = $this->_checkip();                         $this->_dnsIP = $wan_ip;                         $this->_dnsHost = $config['dyndns']['host']; $previousIP = exec("/sbin/ping -c1 $this->_dnsHost | grep PING | cut -d '(' -f2 | cut -d ')' -f1"); log_error("DynDns: Previous DNS IP: {$previousIP}");                         log_error("DynDns: Current WAN IP: {$wan_ip}"); if (file_exists($this->_cacheFile)) {                                 if(file_exists($this->_cacheFile))                                         $contents = file_get_contents($this->_cacheFile);                                 else                                         $contents = "";                                 list($cacheIP,$cacheTime) = split(':', $contents); $this->_debug($cacheIP.'/'.$cacheTime);                                 $initial = false;                                 log_error("DynDns: Cached IP: {$cacheIP}");                         } else {                                 conf_mount_rw();                                 $file = fopen($this->_cacheFile, 'w');                                 fwrite($file, '0.0.0.0:'.$currentTime);                                 fclose($file);                                 conf_mount_ro();                                 $cacheIP = '0.0.0.0';                                 $cacheTime = $currentTime;                                 $initial = true;                                 log_error("DynDns: No Cached IP found.");                         } /*  use 2419200 for dyndns, dhs, easydns, noip, hn                         *  zoneedit, dyns, ods                         */                         $time = '2160000'; $needs_updating = FALSE; /* lets deterimine if the item needs updating /                         if ($previousIP != $wan_ip) {                                 $needs_updating = TRUE;                                 log_error("DynDns: previousIP != wan_ip.  Updating.");                         }                         if ($cacheIP != $wan_ip) {                                 $needs_updating = TRUE;                                 log_error("DynDns: cacheIP != wan_ip.  Updating.");                         }                         $update_reason = "Cached IP: {$cacheIP} WAN IP: {$wan_ip} ";                         if (($currentTime - $cacheTime) > $time ) {                                 $needs_updating = TRUE;                                 log_error("DynDns: More than 25 days.  Updating.");                         }                         $update_reason .= "{$currentTime} - {$cacheTime} > {$time} ";                         if ($initial == TRUE) {                                 $needs_updating = TRUE;                                 $update_reason .= "Inital update. ";                                 log_error("DynDns: Initial run.  Updating.");                         }                         /  finally if we need updating then store the                         *  new cache value and return true                         */                         if($needs_updating == TRUE) {                                 return TRUE;                         } else {                                 return FALSE;                         } log_error("DynDns debug information: {$update_reason}"); } filter.inc.txt dyndns.class.txt pfsense-utils.inc.txt
  • PPTP failover

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    H
    Excellent. Works perfectly. Thanks hoba.
  • CARP with two NICS?

    Locked
    11
    0 Votes
    11 Posts
    6k Views
    H
    pfsync and carp shouldn't interfere with each other. Swapping Master/Backup status can only be related to CARP, not to pfSync.
  • CARP Master / Master

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    S
    http://doc.pfsense.org/index.php/Setting_up_CARP_with_pfSense
  • Quick carp/default gateway question

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    I
    Works like a charm.  Thanks a bunch!
  • CARP + Dual WAN connection failover

    Locked
    6
    0 Votes
    6 Posts
    4k Views
    T
    I have found out the root causes.  It's not the problem with the switch.  It was b/c of the firewall rules.  When the FW outbound LAN rule got change to use the Failover pool, the default route is no long effective.  When master & slave send out the broadcast message of VRRP to 244.0.0.18, it used the Failover for it routing table and Failover pool is only routed to either WAN1 or WAN2 which doesn't know the route of the internal LAN subnet.  That's why stage MASTER/MASTER were on both machines.  Once I create the new rule for LAN subnet to allow traffic to 244.0.0.18 using the default gateway, then it fixed the problem. It's working great now.  Disable on master –> switch over to salve.  Enable back --> fallback to master.
  • CARP and Routed Real IP Subnet

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    H
    Exactly
  • Kernel: carp3: incorrect hash

    Locked
    12
    0 Votes
    12 Posts
    8k Views
    U
    thanks for yours help
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.