Advertising
- Something
- Saturday, January 19th, 2008 at 12:50:18am UTC
- My Ethernet card is eth0 the ip addy is 192.168.0.1 static
- My Wireless card is wlan0 the ip addy is 192.168.2.3 Dhcp
- My Router ip addy is 192.168.2.1
- Im trying to internet connection share the eth0 and wlan0. Wlan0 is the internet connection
- sudo ifconfig wlan0 192.168.0.1
- sudo iptables -A FORWARD -i eth1 -o wlan0 -s 192.168.0.0/24 -m state --state NEW -j ACCEPT
- sudo iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
- sudo iptables -A POSTROUTING -t nat -j MASQUERADE
- sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
- ----------------Dhclient
- [email protected]:~$ sudo dhclient
- [sudo] password for family:
- Internet Systems Consortium DHCP Client V3.0.5
- Copyright 2004-2006 Internet Systems Consortium.
- All rights reserved.
- For info, please visit http://www.isc.org/sw/dhcp/
- Listening on LPF/wlan0/00:18:e7:1a:ee:6f
- Sending on LPF/wlan0/00:18:e7:1a:ee:6f
- Listening on LPF/eth0/00:0a:e6:a7:25:67
- Sending on LPF/eth0/00:0a:e6:a7:25:67
- Sending on Socket/fallback
- DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
- DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
- DHCPOFFER from 192.168.2.1
- DHCPREQUEST on wlan0 to 255.255.255.255 port 67
- DHCPACK from 192.168.2.1
- SIOCSIFMTU: Invalid argument
- bound to 192.168.2.3 -- renewal in 946780455 seconds.
- -------IPTABLES
- [email protected]:~$ iptables -L
- iptables v1.3.6: can't initialize iptables table `filter': Permission denied (you must be root)
- Perhaps iptables or your kernel needs to be upgraded.
- [email protected]:~$ sudo iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- ACCEPT 0 -- 192.168.0.0/24 anywhere state NEW
- ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.