diff -rub orig_pfsense/conf.default/config.xml UPLOAD_pfsense!!!/conf.default/config.xml
--- orig_pfsense/conf.default/config.xml	2006-03-09 23:44:28.000000000 +0300
+++ UPLOAD_pfsense!!!/conf.default/config.xml	2006-11-13 14:15:33.000000000 +0300
@@ -115,6 +115,9 @@
 	<pppoe>
 		<username></username>
 		<password></password>
+		<local></local>
+		<subnet></subnet>
+		<remote></remote>
 		<provider></provider>
 		<!--
 		<ondemand/>
diff -rub orig_pfsense/etc/inc/interfaces.inc UPLOAD_pfsense!!!/etc/inc/interfaces.inc
--- orig_pfsense/etc/inc/interfaces.inc	2007-10-15 12:26:18.000000000 +0400
+++ UPLOAD_pfsense!!!/etc/inc/interfaces.inc	2006-11-13 17:40:24.000000000 +0300
@@ -1162,14 +1162,14 @@
 	set bundle disable multilink
 	set bundle authname "{$pppoecfg['username']}"
 	set bundle password "{$pppoecfg['password']}"
-	set link keep-alive 10 60
+	set link keep-alive 60 180
 	set link max-redial 0
-	set link no acfcomp protocomp
+	set link yes acfcomp protocomp
 	set link disable pap chap
 	set link accept chap
 	set link mtu 1492
 	set ipcp yes vjcomp
-	set ipcp ranges 0.0.0.0/0 0.0.0.0/0
+	set ipcp ranges "{$pppoecfg['local']}/{$pppoecfg['subnet']}" "{$pppoecfg['remote']}/{$pppoecfg['subnet']}"
 
 EOD;
 
@@ -1178,6 +1178,11 @@
 	set ipcp enable req-pri-dns
 
 EOD;
+		if (!isset($config['pppoe']['dnsnosec'])) {
+			$mpdconf .= <<<EOD
+
+EOD;
+		}
 	}
 
 	$mpdconf .= <<<EOD
diff -rub orig_pfsense/usr/local/www/interfaces_wan.php UPLOAD_pfsense!!!/usr/local/www/interfaces_wan.php
--- orig_pfsense/usr/local/www/interfaces_wan.php	2007-10-15 11:59:17.000000000 +0400
+++ UPLOAD_pfsense!!!/usr/local/www/interfaces_wan.php	2007-10-17 10:41:03.000000000 +0400
@@ -39,6 +39,9 @@
 $pconfig['username'] = $config['pppoe']['username'];
 $pconfig['password'] = $config['pppoe']['password'];
 $pconfig['provider'] = $config['pppoe']['provider'];
+$pconfig['pppoe_local'] = $config['pppoe']['local'];
+$pconfig['pppoe_subnet'] = $config['pppoe']['subnet'];
+$pconfig['pppoe_remote'] = $config['pppoe']['remote'];
 $pconfig['pppoe_dialondemand'] = isset($config['pppoe']['ondemand']);
 $pconfig['pppoe_idletimeout'] = $config['pppoe']['timeout'];
 
@@ -122,11 +125,11 @@
 		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
 	} else if ($_POST['type'] == "PPPoE") {
 		if ($_POST['pppoe_dialondemand']) {
-			$reqdfields = explode(" ", "username password pppoe_dialondemand pppoe_idletimeout");
-			$reqdfieldsn = explode(",", "PPPoE username,PPPoE password,Dial on demand,Idle timeout value");
+			$reqdfields = explode(" ", "username password pppoe_local pppoe_subnet pppoe_remote pppoe_dialondemand pppoe_idletimeout");
+			$reqdfieldsn = explode(",", "PPPoE username,PPPoE password,PPPoE local IP address,PPPoE subnet,PPPoE remote IP address,Dial on demand,Idle timeout value");
 		} else {
-			$reqdfields = explode(" ", "username password");
-			$reqdfieldsn = explode(",", "PPPoE username,PPPoE password");
+			$reqdfields = explode(" ", "username password pppoe_local pppoe_subnet pppoe_remote");
+			$reqdfieldsn = explode(",", "PPPoE username,PPPoE password,PPPoE local IP address,PPPoE subnet,PPPoE remote IP address");
 		}
 		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
 	} else if ($_POST['type'] == "PPTP") {
@@ -215,6 +218,9 @@
 		unset($wancfg['dhcphostname']);
 		unset($config['pppoe']['username']);
 		unset($config['pppoe']['password']);
+		unset($config['pppoe']['local']);
+		unset($config['pppoe']['subnet']);
+		unset($config['pppoe']['remote']);
 		unset($config['pppoe']['provider']);
 		unset($config['pppoe']['ondemand']);
 		unset($config['pppoe']['timeout']);
@@ -253,6 +259,9 @@
 			$wancfg['ipaddr'] = "pppoe";
 			$config['pppoe']['username'] = $_POST['username'];
 			$config['pppoe']['password'] = $_POST['password'];
+			$config['pppoe']['local'] = $_POST['pppoe_local'];
+			$config['pppoe']['subnet'] = $_POST['pppoe_subnet'];
+			$config['pppoe']['remote'] = $_POST['pppoe_remote'];
 			$config['pppoe']['provider'] = $_POST['provider'];
 			$config['pppoe']['ondemand'] = $_POST['pppoe_dialondemand'] ? true : false;
 			$config['pppoe']['timeout'] = $_POST['pppoe_idletimeout'];
@@ -305,6 +314,8 @@
 function enable_change(enable_change) {
 	if (document.iform.pppoe_dialondemand.checked || enable_change) {
 		document.iform.pppoe_idletimeout.disabled = 0;
+		document.iform.pppoe_local.disabled = 0;
+		document.iform.pppoe_remote.disabled = 0;
 	} else {
 		document.iform.pppoe_idletimeout.disabled = 1;
 	}
@@ -328,6 +339,9 @@
 			document.iform.provider.disabled = 1;
 			document.iform.pppoe_dialondemand.disabled = 1;
 			document.iform.pppoe_idletimeout.disabled = 1;
+			document.iform.pppoe_local.disabled = 1;
+			document.iform.pppoe_subnet.disabled = 1;
+			document.iform.pppoe_remote.disabled = 1;
 			document.iform.ipaddr.disabled = 0;
 			document.iform.subnet.disabled = 0;
 			document.iform.gateway.disabled = 0;
@@ -351,6 +365,9 @@
 			document.iform.provider.disabled = 1;
 			document.iform.pppoe_dialondemand.disabled = 1;
 			document.iform.pppoe_idletimeout.disabled = 1;
+			document.iform.pppoe_local.disabled = 1;
+			document.iform.pppoe_subnet.disabled = 1;
+			document.iform.pppoe_remote.disabled = 1;
 			document.iform.ipaddr.disabled = 1;
 			document.iform.subnet.disabled = 1;
 			document.iform.gateway.disabled = 1;
@@ -372,6 +389,9 @@
 			document.iform.username.disabled = 0;
 			document.iform.password.disabled = 0;
 			document.iform.provider.disabled = 0;
+			document.iform.pppoe_local.disabled = 0;
+			document.iform.pppoe_subnet.disabled = 0;
+			document.iform.pppoe_remote.disabled = 0;
 			document.iform.pppoe_dialondemand.disabled = 0;
 			if (document.iform.pppoe_dialondemand.checked || enable_change) {
 				document.iform.pppoe_idletimeout.disabled = 0;
@@ -401,6 +421,9 @@
 			document.iform.provider.disabled = 1;
 			document.iform.pppoe_dialondemand.disabled = 1;
 			document.iform.pppoe_idletimeout.disabled = 1;
+			document.iform.pppoe_local.disabled = 1;
+			document.iform.pppoe_subnet.disabled = 1;
+			document.iform.pppoe_remote.disabled = 1;
 			document.iform.ipaddr.disabled = 1;
 			document.iform.subnet.disabled = 1;
 			document.iform.gateway.disabled = 1;
@@ -428,6 +451,9 @@
 			document.iform.provider.disabled = 1;
 			document.iform.pppoe_dialondemand.disabled = 1;
 			document.iform.pppoe_idletimeout.disabled = 1;
+			document.iform.pppoe_local.disabled = 1;
+			document.iform.pppoe_subnet.disabled = 1;
+			document.iform.pppoe_remote.disabled = 1;
 			document.iform.ipaddr.disabled = 1;
 			document.iform.subnet.disabled = 1;
 			document.iform.gateway.disabled = 1;
@@ -561,6 +587,20 @@
                   </td>
                 </tr>
                 <tr>
+                  <td width="100" valign="top" class="vncellreq">Local IP address</td>  <td class="vtable">  <input name="pppoe_local" type="text" class="formfld" id="pppoe_local" size="20" value="<?=htmlspecialchars($pconfig['pppoe_local']);?>">
+		    <select name="pppoe_subnet" class="formfld" id="pppoe_subnet">
+		    <?php for ($i = 32; $i >= 0; $i--): ?>
+		    <option value="<?=$i;?>" <?php if ($i == $pconfig['pppoe_subnet']) echo "selected"; ?>>
+		    <?=$i;?>
+		    </option>
+		    <?php endfor; ?>
+		    </select>
+		  <br>Note: If dynamic address then set local ip adress 0.0.0.0 mask 0</td>
+		</tr>
+		<tr>
+		    <td width="100" valign="top" class="vncellreq">Remote IP address</td>                  <td class="vtable">                    <input name="pppoe_remote" type="text" class="formfld" id="pppoe_remote" size="20" value="<?=htmlspecialchars($pconfig['pppoe_remote']);?>">                    <br>
+		        Note: If dynamic address then set remote ip adress  0.0.0.0</td>
+                <tr>
                   <td valign="top" class="vncell">Service name</td>
                   <td class="vtable"><input name="provider" type="text" class="formfld" id="provider" size="20" value="<?=htmlspecialchars($pconfig['provider']);?>">
                     <br> <span class="vexpl">Hint: this field can usually be left
