[asterisk-biz] Bypass Hotel hotspot login page for IP Phone

Alex Balashov abalashov at evaristesys.com
Thu Oct 29 10:30:59 CDT 2009


(Works if your laptop is Linux:)

I would connect the IP phone to your laptop via a switch.  Plug your 
laptop into same switch.  Plug cable going into hotel jack into switch 
as well.

Set up a virtual subinterface (i.e. eth0:1) on a /30 with your phone 
on the other side, i.e. 192.168.200.1/30 (laptop) and 192.168.200.2/30 
(phone).  Set 192.168.200.1 to be your phone's default gateway.

Then, set up other interface on laptop (eth0) as per normal to connect 
to hotel, e.g. acquire a DHCP lease on it.

Enable IP forwarding:

    echo 1 > /proc/sys/net/ipv4/ip_forward

Then, NAT your phone's traffic out of your laptop.  From the hotel 
router's point of view, it will appear to be coming out of your laptop:

    iptables -A POSTROUTING -o eth0 -s 192.168.200.0/30 -j MASQUERADE

This will put you behind two layers of NAT from the point of view of 
your service provider/PBX/whatever, but if the reregistration 
intervals are frequent enough, OPTIONS pings are turned on 
(qualify=yes if Asterisk is the UAS), and the upstream NAT gateway 
isn't ridiculous, it should work - certainly enough to reliably make 
calls out.

-- 
Alex Balashov - Principal
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671



More information about the asterisk-biz mailing list