S
S
SysUtils2017-03-18 16:21:36
linux
SysUtils, 2017-03-18 16:21:36

Tweaking WebRTC and Loopback adapter?

Good evening everyone. There is such an instruction for 'fine tuning' WebRTC, on a Windows virtual machine. You need to do the same, only under the localhost on Ubuntu. What was done? The iptables rules are written to block unnecessary udp traffic:

iptables -A OUTPUT -o lo -j ACCEPT #Разрешаем локальный трафик
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT #Разрешаем трафик для DNS сервера
iptables -A OUTPUT -p udp -j DROP #Запрещаем остальной udp трафик

Further, according to the idea, you need to set up a route, and this is where problems arose. Let's say I want my external WebRTC to be 127.0.0.1. I write the following
route add -net 127.0.0.1 netmask 255.255.255.255 gateway 100.76.74.62 ppp0
But nothing has changed (restarted networking). Here is what the ifconfig command says:
enp3s0    Link encap:Ethernet  HWaddr 4c:72:b9:46:d9:53  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Локальная петля (Loopback)  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2149 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2149 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:144334 (144.3 KB)  TX bytes:144334 (144.3 KB)

ppp0      Link encap:Протокол PPP (Point-to-Point Protocol)  
          inet addr:100.76.74.62  P-t-P:0.0.0.0  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:392596 errors:0 dropped:0 overruns:0 frame:0
          TX packets:244084 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:510464211 (510.4 MB)  TX bytes:22995525 (22.9 MB)

wlp4s0    Link encap:Ethernet  HWaddr 00:08:ca:f9:2d:e2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlp4s0 is the internal network card. ppp0 - usb modem (in this example, it acts as a device through which Internet access is provided), enp3s0 - lan cable. Question: what am I doing wrong? And do I do that at all? What do you say?
UDP : 127.0.0.1 is taken as an example. As far as I understood correctly, for the desired ip, you need to change the lo address of the adapter and change the settings for it accordingly.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question