From d28f8cbcf00a4b5356dee6eec8c6fdd3d2d6b4f9 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Cuesta Date: Tue, 27 Feb 2001 12:45:43 +0000 Subject: [PATCH] Make clear the interface used by user-ppp (tun0) and pppd (ppp0). PR: docs/23342 Submitted by: ncalvo@es.freebsd.org --- .../articles/dialup-firewall/article.sgml | 66 ++++++++++++++++++- .../articles/dialup-firewall/article.sgml | 66 ++++++++++++++++++- 2 files changed, 128 insertions(+), 4 deletions(-) diff --git a/en_US.ISO8859-1/articles/dialup-firewall/article.sgml b/en_US.ISO8859-1/articles/dialup-firewall/article.sgml index 750a33b619..2916c685b7 100644 --- a/en_US.ISO8859-1/articles/dialup-firewall/article.sgml +++ b/en_US.ISO8859-1/articles/dialup-firewall/article.sgml @@ -1,7 +1,7 @@ - $Date: 2001-01-18 23:43:31 $ + $Date: 2001-02-27 12:45:43 $ This article documents how to setup a firewall using a PPP @@ -294,6 +294,68 @@ $fwcmd add 65435 deny log ip from any to any firewall. + + + + There must be something wrong. I followed your instructions + to the letter and now I am locked out. + + + + This tutorial assumes that you are running + userland-ppp, therefore the supplied ruleset + operates on the tun0 interface, which + corresponds to the first connection made with &man.ppp.8; (a.k.a. + user-ppp). Additional connections would use + tun1, tun2 and so + on. + + You should also note that &man.pppd.8; uses the + ppp0 interface instead, so if you start the + connection with &man.pppd.8; you must substitute + tun0 for ppp0. A + quick way to edit the firewall rules to reflect this change is shown + below. The original ruleset is backed up as + fwrules_tun0. + + + &prompt.user; cd /etc/firewall + /etc/firewall&prompt.user; su + Password: + /etc/firewall&prompt.root; mv fwrules fwrules_tun0 + /etc/firewall&prompt.root; cat fwrules_tun0 | sed s/tun0/ppp0/g > fwrules + + + To know whether you are currently using &man.ppp.8; or + &man.pppd.8; you can examine the output of &man.ifconfig.8; once the + connection is up. E.g., for a connection made with &man.pppd.8; you + would see something like this (showing only the relevant lines): + + + &prompt.user; ifconfig + (skipped...) + ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 + inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xff000000 + (skipped...) + + + On the other hand, for a connection made with &man.ppp.8; + (user-ppp) you should see something similar to + this: + + + &prompt.user; ifconfig + (skipped...) + ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 + (skipped...) + tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 + (IPv6 stuff skipped...) + inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xffffff00 + Opened by PID xxxxx + (skipped...) + + + diff --git a/en_US.ISO_8859-1/articles/dialup-firewall/article.sgml b/en_US.ISO_8859-1/articles/dialup-firewall/article.sgml index 750a33b619..2916c685b7 100644 --- a/en_US.ISO_8859-1/articles/dialup-firewall/article.sgml +++ b/en_US.ISO_8859-1/articles/dialup-firewall/article.sgml @@ -1,7 +1,7 @@ - $Date: 2001-01-18 23:43:31 $ + $Date: 2001-02-27 12:45:43 $ This article documents how to setup a firewall using a PPP @@ -294,6 +294,68 @@ $fwcmd add 65435 deny log ip from any to any firewall. + + + + There must be something wrong. I followed your instructions + to the letter and now I am locked out. + + + + This tutorial assumes that you are running + userland-ppp, therefore the supplied ruleset + operates on the tun0 interface, which + corresponds to the first connection made with &man.ppp.8; (a.k.a. + user-ppp). Additional connections would use + tun1, tun2 and so + on. + + You should also note that &man.pppd.8; uses the + ppp0 interface instead, so if you start the + connection with &man.pppd.8; you must substitute + tun0 for ppp0. A + quick way to edit the firewall rules to reflect this change is shown + below. The original ruleset is backed up as + fwrules_tun0. + + + &prompt.user; cd /etc/firewall + /etc/firewall&prompt.user; su + Password: + /etc/firewall&prompt.root; mv fwrules fwrules_tun0 + /etc/firewall&prompt.root; cat fwrules_tun0 | sed s/tun0/ppp0/g > fwrules + + + To know whether you are currently using &man.ppp.8; or + &man.pppd.8; you can examine the output of &man.ifconfig.8; once the + connection is up. E.g., for a connection made with &man.pppd.8; you + would see something like this (showing only the relevant lines): + + + &prompt.user; ifconfig + (skipped...) + ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 + inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xff000000 + (skipped...) + + + On the other hand, for a connection made with &man.ppp.8; + (user-ppp) you should see something similar to + this: + + + &prompt.user; ifconfig + (skipped...) + ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 + (skipped...) + tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 + (IPv6 stuff skipped...) + inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xffffff00 + Opened by PID xxxxx + (skipped...) + + +