[kwlug-disc] IP 6 Ad-Hoc Wireless network

Joe Wennechuk youcanreachmehere at hotmail.com
Tue Jul 11 15:01:45 EDT 2017


Very nice .. Thank you very much. I will give this a try soon.


Joseph Wennechuk
Phone: (226) 505-4812
https://www.linkedin.com/pub/joseph-wennechuk/4/b59/382



________________________________
From: kwlug-disc <kwlug-disc-bounces at kwlug.org> on behalf of B.S. <bs27975.2 at gmail.com>
Sent: July 8, 2017 1:21 AM
To: KWLUG discussion
Subject: Re: [kwlug-disc] IP 6 Ad-Hoc Wireless network

I haven't done this with ipv6, myself, but ...

Looks like (man dhcpd.conf) subnet is your key here:
subnet6 <subnet6-number> {
...
}

I also see:
<<<<<
The fixed-address6 declaration
  fixed-address6 ip6-address ;

  The fixed-address6 declaration is used to assign a fixed IPv6
addresses to a client.  It should only appear in a host declaration.
>>>>>

- which may make more sense for you in this use case.

It seems intuitive to have dhcp only bind on your wireless address,
however I see nothing in man dhcpd.conf regarding that. Switching to man
dhcpd-options reveals an entire section on 'STANDARD DHCPV6 OPTIONS'.
Searching 'interface' there reveals ... nothing.

Since I don't see an /etc/default/dhcpd on my system, a quick turn to
google takes me to https://wiki.debian.org/DHCP_Server, and the D'OH
moment of /etc/default/isc-dhcp-server, within which is the
'INTERFACES=""' line that you could set to your wireless interface.

OTOH, for this one use case, it's arguable you could entirely ignore
DHCP, and just have him set his gateway to your wlp6s0 address.
Especially if you set it to a static address.


For bridging, again, I haven't done ipv6, but you'll want to enable
forwarding, make the bridge, and permit forwarding.

Enable Forwarding:
# cat /proc/sys/net/ipv4/ip_forward (or in your case:)
# cat /proc/sys/net/ipv6/conf/all/forwarding (per /etc/sysctl.conf)
## Substitute your interface for all, if you prefer.

echo 1 > <your spot, above> # to enable forwarding.


I've done bridging a couple of ways from the command line:
# brctl addbr br0
# brctl addif br0 eth0
# brctl addif wlp6s0
(# brctl addif br0 eth0 wlp6s0 # may be possible, instead.)

# brctl show br0 # to see what's what.


Or:
# ip link add br0 type bridge
# ip link set dev eth0 master br0
# ip link set dev wlp6s0 master br0

# brctl show br0 # to see what's what, or use equivalent 'ip' commands.


To permit forwarding, try:
# iptables -t nat -vnL

Likely you'll see '(policy ACCEPT' for each chain. You might need
something like:

# iptables -t nat -vA POSTROUTING -i wlp6s0 -o eth0 -j MASQUERADE

For:
# iptables --line-numbers -vnL

You'll likely need something like:
# iptables -vA FORWARD -i wlp6s0 -o eth0 -j ACCEPT

And probably:
# iptables -vA FORWARD -i eth0  -o wlp6s0 -m state --state
RELATED,ESTABLISHED -j ACCEPT


GL&HF.


On 07/07/2017 08:28 AM, Joe Wennechuk wrote:
> Hello!
>
>
>    My friend is submitting an android app to the app store, and it must be tested with ip6. I wanted to set up my machine as an ad hoc wireless network running dhcp, but only dhcp-ing ip6 addresses out, and also bridging it to my wired network connected to the internet with an ip4 setup.
>
>
> I tried it with..
>
> iwconfig wlp6s0 mode ad-hoc
>
> iwconfig wlp6s0 essid blahblahip6-network
>
> iwconfig wlp6s0 key "PasswordForNetwork"
>
> ifconfig wlp6s0 inet6 add 2001:0db8:0:f101::1/64
>
>
> but I'm not sure how to get the dhcp running ip6 only, and how to get the bridge set up to push the wireless through the wired ip4 network I need to figure out the dhcpd.conf  stuff and the bridge..
>
>
>
>
> Joseph Wennechuk
> Phone: (226) 505-4812
> https://www.linkedin.com/pub/joseph-wennechuk/4/b59/382
>
>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>

_______________________________________________
kwlug-disc mailing list
kwlug-disc at kwlug.org
http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20170711/4b623a21/attachment.htm>


More information about the kwlug-disc mailing list