Jump to content
Not connected, Your IP: 3.137.181.194
Sign in to follow this  
resettler

iptables rules unable to work when using mobile broadband

Recommended Posts

I access the internet using AirVPN. With the help of iptables rules all out-going traffic from my machine to the internet is dropped instantly when my VPN connection is abruptly terminated.

The iptables rules work on a wired connection but they do not when I am using mobile broadband.

I tried to solve the problem by sudo-ing and editing the file /etc/udev/rules.d/70-persistent-net.rules to include the following line:

# Mobile Broadband USB dongle
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC address of dongle", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

 

Additional details

To get mobile broadband to work on Debian 7.9, I carried out the following steps:

1. Add the following line to /lib/udev/rules.d/40-usb_modeswitch.rules

# Mobile Broadband USB dongle
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0257", RUN+="usb_modeswitch '%b/%k'"

2. Create a file called 19d2:0257 in /etc/usb_modeswitch.d/ with the following contents:

# Mobile Broadband USB dongle
#
DefaultVendor= 0x19d2
DefaultProduct= 0x0257
TargetVendor= 0x19d2
TargetProduct= 0x0257
MessageContent="55534243123456782400000080000685000000240000000000000000000000"
CheckSuccess=20 

3. In order for Network Manager to recognize the device automatically, I add the following line to /etc/rc.local

modprobe usbserial vendor=0x19d2 product=0x0257

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...