Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
03-16-2009, 04:56 AM
#1
Member
Registered: Aug 2008
Posts: 45
Rep:
Using natd and my comp as a router
I want to use my ubuntu box as a router to route my wireless connection
to other computers in my room. Has anyone done this before? Diagram
below:
http://pwnspeak.com/setup.png
I have read some helpful articles regarding the use of natd to do this with two ethernet cards. And normally the connection was made pre-router, following the modem.
My current Wireless NIC settings:
Code:
wlan0 Link encap:Ethernet HWaddr 00:1d:7d:7a:e4:dd
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe7a:e4dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:842 errors:0 dropped:0 overruns:0 frame:0
TX packets:834 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:775248 (775.2 KB) TX bytes:185584 (185.5 KB)
03-16-2009, 05:35 AM
#2
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
echo "1" > /proc/sys/net/ipv4/ip_forward
this command will make your linux become a router.
then u can choose one of the followings:
1- u should add a static route on wireless router for the computers that are behind the linux. if your iptables rules dont block network traffic, the computers that are behind the linux, must access internet, and all of computers will be able to access each other via network. no need NAT.
2- If u do NAT on linux, the computers behind linux, cannot be accessed from other computers. But the computers behind the linux, can still access internet and all of the computers. in this case u dont need to add a static route on wireless router.
3- u can try bridge on linux. no need static route on router and NAT on linux.
if u need more help, please post the complete network configurations.
so paste the full output of:
route -n
ifconfig
iptables -nvL
iptables -t nat nvL
regards
Last edited by maxut; 03-16-2009 at 05:37 AM .
03-18-2009, 04:08 AM
#3
Member
Registered: Aug 2008
Posts: 45
Original Poster
Rep:
Ok, I think I see what your saying. I enabled ip_forwarding using your 'cat' command. Here is the outut from the command using the Autoeth0.
Code:
beta[root@~] \-> route -n;ifconfig;iptables -nvL;iptables -t nat nvL
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 wlan0
eth0 Link encap:Ethernet HWaddr 00:1f:d0:a0:3b:3f
inet6 addr: fe80::21f:d0ff:fea0:3b3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1446 (1.4 KB) TX bytes:27580 (27.5 KB)
Interrupt:253 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:254 errors:0 dropped:0 overruns:0 frame:0
TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20248 (20.2 KB) TX bytes:20248 (20.2 KB)
wlan0 Link encap:Ethernet HWaddr 00:1d:7d:7a:e4:dd
inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe7a:e4dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3544 errors:0 dropped:0 overruns:0 frame:0
TX packets:3786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2678065 (2.6 MB) TX bytes:765655 (765.6 KB)
wmaster0 Link encap:UNSPEC HWaddr 00-1D-7D-7A-E4-DD-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Chain INPUT (policy ACCEPT 3659 packets, 2626K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 19 packets, 760 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 4278 packets, 685K bytes)
pkts bytes target prot opt in out source destination
Bad argument `nvL'
Try `iptables -h' or 'iptables --help' for more information.
I also created a custom connection using the desired addresses. Here are those outputs.
Code:
beta[root@~] \-> route -n;ifconfig;iptables -nvL;iptables -t nat nvL
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.10.100 0.0.0.0 UG 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:1f:d0:a0:3b:3f
inet addr:192.168.10.200 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fea0:3b3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:265 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1446 (1.4 KB) TX bytes:30845 (30.8 KB)
Interrupt:253 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:259 errors:0 dropped:0 overruns:0 frame:0
TX packets:259 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20608 (20.6 KB) TX bytes:20608 (20.6 KB)
wlan0 Link encap:Ethernet HWaddr 00:1d:7d:7a:e4:dd
inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe7a:e4dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3686 errors:0 dropped:0 overruns:0 frame:0
TX packets:3929 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2760661 (2.7 MB) TX bytes:804482 (804.4 KB)
wmaster0 Link encap:UNSPEC HWaddr 00-1D-7D-7A-E4-DD-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Chain INPUT (policy ACCEPT 3805 packets, 2706K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 19 packets, 760 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 4442 packets, 723K bytes)
pkts bytes target prot opt in out source destination
Bad argument `nvL'
Try `iptables -h' or 'iptables --help' for more information.
I think I need help on setting up the eth0 card to "broadcast" to the other computer. Preferable shell commands if you got em
03-18-2009, 05:56 AM
#4
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
sorry i did a typo mistake in previous post.
i typed "iptables -t nat nvL" but it should be "iptables -t nat
- nvL". it seems there is no rules in iptables. please past the output of "iptables -nvL -t nat". so we will certainly be sure of iptables rules.
your network configuration is not ok. because both of interfaces (eth0 and wlan0) are in same network. u can define another network (example: 192.168.11.0/24) for eth0 and also the computers behind linux must in same network (eth0).
so your network will be like that:
network1 (192.168.11.0/24) ---- (192.168.11.1)eth0
linux wlan0 (192.168.10.100) ------ wireless router ---- internet
* |
* network2 (192.168.100.0/24)
in this scene, linux will be the router for 192.168.11.0 network and if u define a static route on wireless router(AP) for 192.168.11.0/24 gateway 192.168.10.100, everything should work. if not, do nat on linux
Code:
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.11.0/24 -j MASQUERADE
best regards
03-18-2009, 12:20 PM
#5
Member
Registered: Aug 2008
Posts: 45
Original Poster
Rep:
I'm having trouble editing the configuration for eth0. I seem to be able to define values only through Network Connection GUI, and that is throwing things off. SHould it be like ifconfig DEFINE SOME VALUES?
Also you mention static routes on my router, however to create my wireless static route, I simply defined dynamic routes via my router, and disabled the DHCP on my linux box, and manually created the route via linux network config. Is there anything else I should do, wrt4g* (the most popular wireless router ever) ?
THanks again
Code:
beta[root@proc] \-> route -n;ifconfig;iptables -nvL;iptables -t nat -nvL
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 wlan0
eth0 Link encap:Ethernet HWaddr 00:1f:d0:a0:3b:3f
inet6 addr: fe80::21f:d0ff:fea0:3b3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:0
TX packets:324 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6810 (6.8 KB) TX bytes:40950 (40.9 KB)
Interrupt:253 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:484 errors:0 dropped:0 overruns:0 frame:0
TX packets:484 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32889 (32.8 KB) TX bytes:32889 (32.8 KB)
wlan0 Link encap:Ethernet HWaddr 00:1d:7d:7a:e4:dd
inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe7a:e4dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23892 errors:0 dropped:0 overruns:0 frame:0
TX packets:22524 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17904884 (17.9 MB) TX bytes:4011963 (4.0 MB)
wmaster0 Link encap:UNSPEC HWaddr 00-1D-7D-7A-E4-DD-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Chain INPUT (policy ACCEPT 21640 packets, 17M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 76 packets, 24182 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 23175 packets, 3346K bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 56 packets, 19318 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 55 packets, 3747 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * wlan0 192.168.11.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 55 packets, 3747 bytes)
pkts bytes target prot opt in out source destination
03-19-2009, 03:42 AM
#6
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
network config file:
/etc/network/interfaces
for details:
03-19-2009, 12:25 PM
#7
Member
Registered: Aug 2008
Posts: 45
Original Poster
Rep:
The interfaces file does not seem to have much in it, other that localhost settings:
Code:
auto lo
iface lo inet loopback
But I did get this all to work, and I will post how later on today. In the meantime here my final output with the bridge working:
Code:
beta[root@bin] \-> route -n;ifconfig;iptables -nvL;iptables -t nat -nvL
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 wlan0
eth0 Link encap:Ethernet HWaddr 00:1f:d0:a0:3b:3f
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fea0:3b3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6642 errors:0 dropped:0 overruns:0 frame:0
TX packets:10711 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:589579 (589.5 KB) TX bytes:15405526 (15.4 MB)
Interrupt:253 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:271 errors:0 dropped:0 overruns:0 frame:0
TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14662 (14.6 KB) TX bytes:14662 (14.6 KB)
wlan0 Link encap:Ethernet HWaddr 00:1d:7d:7a:e4:dd
inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::21d:7dff:fe7a:e4dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111159 errors:0 dropped:0 overruns:0 frame:0
TX packets:85060 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:137128314 (137.1 MB) TX bytes:10683735 (10.6 MB)
wmaster0 Link encap:UNSPEC HWaddr 00-1D-7D-7A-E4-DD-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Chain INPUT (policy DROP 2 packets, 656 bytes)
pkts bytes target prot opt in out source destination
782 781K ACCEPT tcp -- * * 192.168.10.1 0.0.0.0/0 tcp flags:!0x17/0x02
193 22814 ACCEPT udp -- * * 192.168.10.1 0.0.0.0/0
137 8646 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
1 48 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 10/sec burst 5
0 0 DROP all -- wlan0 * 0.0.0.0/0 255.255.255.255
0 0 DROP all -- * * 0.0.0.0/0 192.168.10.255
0 0 DROP all -- * * 224.0.0.0/8 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 224.0.0.0/8
0 0 DROP all -- * * 255.255.255.255 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0
19 760 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 LSI all -f * * 0.0.0.0/0 0.0.0.0/0 limit: avg 10/min burst 5
8508 7989K INBOUND all -- wlan0 * 0.0.0.0/0 0.0.0.0/0
2 120 INBOUND all -- eth0 * 0.0.0.0/0 192.168.0.1
9 540 INBOUND all -- eth0 * 0.0.0.0/0 192.168.10.100
1 74 INBOUND all -- eth0 * 0.0.0.0/0 192.168.0.255
2 656 LOG_FILTER all -- * * 0.0.0.0/0 0.0.0.0/0
2 656 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Input'
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 10/sec burst 5
86 5136 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
423 51383 OUTBOUND all -- eth0 * 0.0.0.0/0 0.0.0.0/0
357 286K ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.0/24 state RELATED,ESTABLISHED
26 2848 ACCEPT udp -- * * 0.0.0.0/0 192.168.0.0/24 state RELATED,ESTABLISHED
0 0 LOG_FILTER all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Forward'
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 192.168.10.100 192.168.10.1 tcp dpt:53
193 12695 ACCEPT udp -- * * 192.168.10.100 192.168.10.1 udp dpt:53
137 8646 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
0 0 DROP all -- * * 224.0.0.0/8 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 224.0.0.0/8
0 0 DROP all -- * * 255.255.255.255 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0
9 360 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
8997 1542K OUTBOUND all -- * wlan0 0.0.0.0/0 0.0.0.0/0
1 48 OUTBOUND all -- * eth0 0.0.0.0/0 0.0.0.0/0
0 0 LOG_FILTER all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Output'
Chain INBOUND (4 references)
pkts bytes target prot opt in out source destination
8495 7988K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 304 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
21 1274 LSI all -- * * 0.0.0.0/0 0.0.0.0/0
Chain LOG_FILTER (5 references)
pkts bytes target prot opt in out source destination
Chain LSI (2 references)
pkts bytes target prot opt in out source destination
21 1274 LOG_FILTER all -- * * 0.0.0.0/0 0.0.0.0/0
20 1200 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
20 1200 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02
0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04
0 0 LOG icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmp type 8 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmp type 8
1 74 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Inbound '
1 74 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain LSO (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG_FILTER all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Outbound '
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain OUTBOUND (3 references)
pkts bytes target prot opt in out source destination
1 48 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
8982 1573K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
6 456 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
432 20425 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain PREROUTING (policy ACCEPT 340 packets, 96333 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 58 packets, 2556 bytes)
pkts bytes target prot opt in out source destination
604 31762 MASQUERADE all -- * wlan0 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 598 packets, 30373 bytes)
pkts bytes target prot opt in out source destination
03-19-2009, 02:33 PM
#8
Member
Registered: Aug 2008
Posts: 45
Original Poster
Rep:
My method. I used Firestarter, I know, I wish I could have done it through the shell. However, the network config files did not match up as I know them in FreeBSD, which threw me off.
Sharing wlan0 through eth0
1. Create a new wired connection for eth0, or edit the current config. I created a new one because editing the current config did not save after restarting.
2. The new config will be manually setup, IP=192.168.0.1 Mask=255.255.255.0 Gateway=0.0.0.0.
3. I also have a static route from router to wlan0, but this should not be necessary.
4. sudo apt-get install firestarter dhcp3-server
5. edit /etc/default/dhcp3-server to include INTERFACES=”eth0″
6. Open firestart, run the config wizard, and select to share connection from wlan0 to eth0.
7. Edit /etc/sysctl.conf, append 'net.ipv4.ip_forward = 1' (no quotes)
And this worked!
All times are GMT -5. The time now is 07:32 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News