Anton Achatz schrieb:
> first i have loaded the module "usbnet"
>         modprobe usbnet
> 
> then
>         ifconfig usb0 192.168.0.202
> 
> then
>         route add -host 192.168.0.200 usb0
> 
> ping 192.168.0.202 answers ok.
> 
> 
> So now i have to enable the NAT support in archlinux, but how?
> 
> I tried to enable via
>          /proc/sys/net/ipv4/ip_forward = 1
> 
> and also tried edit
>         /etc/sysctl.conf and set 1 to the net.ipv4.ip_forward
> (net.ipv4.ip_forward=1)

iptables -t nat -A POSTROUTING -s 192.168.0.200 -o ppp0 -j MASQUERADE

Replace ppp0 with your outgoing interface, like eth0 or so. Now on your
usb device, set 192.168.0.202 as default route and use the DNS from your
/etc/resolv.conf.

You still need the ip_forward setting! Use /etc/rc.d/iptables save to
save the iptables rules and add 'iptables' to your rc.conf to set them
at boot time.

A short introduction to iptables can be found here:
http://wiki.archlinux.org/index.php/Simple_stateful_firewall_HOWTO

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to