Remote login via modem
Ian Smith
smithi at nimnet.asn.au
Sun May 20 06:02:27 UTC 2007
On Sat, 19 May 2007 12:45:35 -0700 Lou Katz <lou at metron.com> wrote:
> On Sat, May 19, 2007 at 07:49:46AM +0200, Nikola Lecic wrote:
Sorry Nicola, no cc, your email address wasn't quoted ..
> > On Sat, 19 May 2007 11:49:47 +1000
> > Ivan Carey <ivan at careytech.com.au> wrote:
> >
> > > Hello,
> > > I would like to be able to access my network remotely via modem
> > > access.
> > >
> > > What I am trying to achieve is this. At the office I have a server,
> > > this server is Not connected to the Internet, I need to be able to
> > > Administer it from my Home office, so I am thinking that I need to
> > > access it via a serial modem.
> > > What do I need to do to achieve this.
> >
> > You need getty(8) or /usr/ports/comms/mgetty+sendfax. Please read
> >
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dialup.html
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html
> This shows how to connect to some other ISP with ppp. I need to setup MY machine
> to accept INCOMING PPP, and can't find any doc (though I could have overlooked it).
> Pointers to setup of incoming ppp dialin greatly appreciated.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html
Assuming you're using userppp rather than pppd. The above is a useful
outline, but for some detail I include the dialup configuration from an
old server here. Note this was for FreeBSD 2.2.6 and a few things have
changed, like the names of ttydX and cuaaX, but maybe it'll help.
/etc/ttys:
[.. normal stuff, then ..]
# dialout: cuaa0 used by ppp
ttyd0 "/usr/libexec/getty std.57600" vt100 off insecure
# dialups:
ttyd1 "/usr/local/sbin/mgetty" vt100 on insecure
ttyd2 "/usr/local/sbin/mgetty" vt100 on insecure
ttyd3 "/usr/local/sbin/mgetty" vt100 on insecure
/usr/local/etc/mgetty+sendfax/login.config:
# ppp logs in (utmp) once authenticated
/AutoPPP/ - - /etc/ppp/ppp-pap-dialup @
#
#% 4/9/4 deny all members for direct (non-ppp, terminal) logins except ..
smithi smithi smithi /usr/bin/login @
greg greg greg /usr/bin/login @
* - - /usr/bin/false @
/usr/local/etc/mgetty+sendfax/mgetty.config:
port ttyd1
debug 4
fax-id 00 00 000000
speed 115200
switchbd 19200
direct NO
blocking NO
port-owner uucp
port-group dialer
port-mode 0660
toggle-dtr YES
toggle-dtr-waittime 400
data-only yes
fax-only NO
modem-type data
# Spirit 336L (Rockwell chipset)
init-chat "" ATS0=0Q0&D2&C1S95=47 OK
modem-check-time 600
rings 2
answer-chat "" ATA CONNECT \c \r
answer-chat-timeout 60
autobauding no
ringback NO
ringback-time 30
ignore-carrier false
issue-file /etc/issue
prompt-waittime 500
login-prompt @ login:
login-time 60
diskspace 2048
notify faxadmin
fax-owner uucp
fax-group dialer
fax-mode 0660
port ttyd2
[.. ditto; port ttyd3 ditto, modulo init-chat for other type modems ..]
/etc/ppp/ppp-pap-dialup:
#!/bin/sh
#% ppp-pap-dialup 28Jun98, test version, adapted from:
# ppp-shell 25May98 smithi from 2.2.5 handbook, PPP Configuration
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
# CALLEDAS="$IDENT"
TTY=`tty`
IDENT=`basename $TTY`
/usr/sbin/ppp -direct pap$IDENT
/etc/ppp/ppp.conf:
default:
allow users *
enable throughput
set log phase chat connect carrier link ipcp ccp ID0 TUN
set speed 115200
disable lqr
deny lqr
set timeout 1200
# dialout line: (4Jul98) =============================================
telstra:
set log +command
allow users root smithi greg
allow mode auto ddial dedicated background
set server 3000
set device /dev/cuaa0
set timeout 0
# rest of dialout config not shown ..
# dialup lines: =============================================
papttyd1:
set server 3001
allow users *
# force use of pap, use /etc/passwd auth
enable pap
enable passwdauth
# for broken linux pppd callers :(
disable pred1
deny pred1
disable deflate
deny deflate
#
set ifaddr x.y.z.145 x.y.z.161 255.255.255.255
delete ALL
# 1may99 keepalive filters
set afilter 0 deny icmp
set afilter 1 deny tcp dst eq 110
set afilter 2 deny tcp src eq 110
# [.. various others ..]
set afilter 15 deny udp src eq 53
set afilter 16 deny udp dst eq 53
# last allowed is rule 19
set afilter 17 permit 0/0 0/0
papttyd2:
set server 3002
allow users *
# [.. ditto ..]
set ifaddr x.y.x.146 x.y.z.162 255.255.255.255
delete ALL
# [ ditto papttyd3: ..]
Cheers, Ian
More information about the freebsd-questions
mailing list