[SOLVED] Anonymous mode and internet distribution

Started by qpens8, August 24, 2014, 09:18:41 PM

Previous topic - Next topic

qpens8

Hi
I'm using Backbox to distribute internet over my flat. I'm taking internet from outside building to the laptop then to the router(by cable). When I'm starting anonymous mode only main pc have internet rest of them don't. Is there any solution for that? ??? ??? ???

weVeg

#1
Hi qpens8,
anonymous mode erase all your iptables chain and write his own then you can not share internet anymore, this is the problem...
All you can do is to add a different rules on iptables!
When I need to share internet I set my iptables with this 2 chain, 1 used as "server" and 1 as client:

#!/bin/bash

# CLIENT

ifconfig eth0 down
ifconfig eth0 192.168.100.3


route add default gw 192.168.100.2

sh -c "echo nameserver 8.8.8.8 >> /etc/resolv.conf"
sh -c "echo nameserver 8.8.8.8 >> /etc/resolv.conf"

ifconfig eth0 up

sleep 4

# TEST CONNESSIONE
ping 8.8.8.8

if [ $?= 0]
then
echo "connessione stabilita con successo"
else
echo "impossibile stabire la connessione"
# FINE TEST

and this for the server

#!/bin/bash

ifconfig eth0 down
ifconfig eth0 192.168.100.2
ifconfig eth0 up

iptables -A FORWARD -i wlan0 -o eth0 -s 192.168.100.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE

sleep 2

sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"


I guess that doesn't work because anonymouse mode has his own rules that doesn't agree with those I paste. But, may be, you can share connection and enable anonymouse mode only in client pc with some mod...
Hope I help you!
cheers!!
una voce libera รจ sempre liberatrice
under_r00t