LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-16-2009, 04:56 AM   #1
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Rep: Reputation: 16
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)
 
Old 03-16-2009, 05:35 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
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.
 
Old 03-18-2009, 04:08 AM   #3
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Original Poster
Rep: Reputation: 16
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
 
Old 03-18-2009, 05:56 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
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
 
Old 03-18-2009, 12:20 PM   #5
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Original Poster
Rep: Reputation: 16
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
 
Old 03-19-2009, 03:42 AM   #6
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
network config file:
/etc/network/interfaces
for details:
Code:
man interfaces
 
Old 03-19-2009, 12:25 PM   #7
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Original Poster
Rep: Reputation: 16
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
 
Old 03-19-2009, 02:33 PM   #8
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Original Poster
Rep: Reputation: 16
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!
 
Old 03-20-2009, 02:04 PM   #9
acmeinc
Member
 
Registered: Aug 2008
Posts: 45

Original Poster
Rep: Reputation: 16
Internet connection sharing has broken my port forwarding. Details in a new thread, you may consider this one closed.

http://www.linuxquestions.org/questi...9/#post3482394
 
  


Reply

Tags
bridge, connection, ethernet, linux, networking, router, routing, share, ubuntu, wireless



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two comp network with belkin wireless card and router windell Linux - Wireless Networking 1 07-24-2005 05:49 AM
how to do: using a linux comp to act as router for a windows comp grimhammer Linux - Networking 8 02-10-2005 09:56 PM
BSD Router with natd and ipfw need help please SIP2005 *BSD 25 12-06-2004 02:29 PM
How do i turn an old comp into a router? NovaWo1f Linux - Networking 5 06-04-2004 06:06 PM
Two domains, linux router, Route 1 domain to internel comp. lil_critter99 Linux - Networking 1 02-09-2002 02:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration