You are not logged in.
I try to share internet connection from my PC (Arch) to my laptop (Win7) like here: https://wiki.archlinux.org/index.php/Internet_Share and here: https://wiki.archlinux.org/index.php/Dhcpd, because I need to have dhcp server.
I don't have permission to change any network settings on my laptop, I can configure Linux only.
My dhcp config:
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.255;
}I configured interface:
ifconfig eth1 10.0.0.1I enabled packet forwarding:
sysctl net.ipv4.ip_forwarding=1I configured iptables:
iptables -t nat -A POSTROUTING -o internet0 -j MASQUERADEDhcp server run without problem.
In effect, my laptop have dhcp server address, have own ip, but gateway address is empty. Network unidentified.
What is wrong? If I connect directly to my router, internet on laptop works fine.
Any (easy and clear) manual or something?
Last edited by n0rv (2012-11-20 20:34:30)
Offline
You need further configuration in your DHCP config; for starters, you need to include the gateway address, and some DNS servers would help too. Don't forget the "authoritative" directive at the top of your DHCP conf too.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Ok, I update dhcpd.conf:
authotitative;
option routers 10.0.0.1;
option domain-name-servers 208.67.222.222;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.255;
}but nothing happened ![]()
Problem was in iptables config, I should use:
iptables --append FORWARD --in-interface eth0 -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADEand now it works!
Offline
Glad you figured it out ![]()
You don't need to masquerade traffic out eth1 interface though. You've got a typo in "authoritative" too.
EDIT: Also, avoid OpenDNS
Last edited by fukawi2 (2012-11-21 22:09:16)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline