PDA

View Full Version : [ubuntu] How to port forward form one device to another?



Blacklightbulb
April 1st, 2010, 11:45 PM
I have a host and a client both running linux. Host has internet through eth2. Client needs to share that connection. The computers are connected directly using a crossover. I can ping from both fine.

I figured I needed to port forward eth2 to eth0 to gain internet access in the client. How?
Thanks!


eth0 Link encap:Ethernet HWaddr 00:26:18:a6:fd:a3
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::226:18ff:fea6:fda3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:270 errors:0 dropped:0 overruns:0 frame:0
TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26975 (26.9 KB) TX bytes:33845 (33.8 KB)
Interrupt:28 Base address:0xc000

eth2 Link encap:Ethernet HWaddr 00:14:7f:ab:66:cb
inet6 addr: fe80::214:7fff:feab:66cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16314 errors:0 dropped:0 overruns:0 frame:0
TX packets:14295 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18027414 (18.0 MB) TX bytes:1839402 (1.8 MB)

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:1076 errors:0 dropped:0 overruns:0 frame:0
TX packets:1076 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:68766 (68.7 KB) TX bytes:68766 (68.7 KB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:195.158.91.122 P-t-P:192.168.180.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:13271 errors:0 dropped:0 overruns:0 frame:0
TX packets:11509 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:15853171 (15.8 MB) TX bytes:1182177 (1.1 MB)

Blacklightbulb
April 1st, 2010, 11:51 PM
Also if it might help. I installed firestarter but when I choose eth2 it return a "device not ready" error. The client never reaches internet.

Blacklightbulb
April 2nd, 2010, 12:08 AM
/bump

Blacklightbulb
April 2nd, 2010, 12:12 AM
sudo gedit /etc/resolv.conf


# Generated by NetworkManager
nameserver 194.158.37.196
nameserver 194.158.37.211

This isn't right is it?
How should I modify it?

Iowan
April 2nd, 2010, 12:40 AM
Which release are you running - Karmic? There should be an option to "Share with other computers" (or something similar) under Network Manager. This (https://help.ubuntu.com/community/Internet/ConnectionSharing#Ubuntu%209.10%20Method) help page goes into details.

Blacklightbulb
April 2nd, 2010, 01:00 AM
Which release are you running - Karmic? There should be an option to "Share with other computers" (or something similar) under Network Manager. This (https://help.ubuntu.com/community/Internet/ConnectionSharing#Ubuntu%209.10%20Method) help page goes into details.

Yep karmic. How do I go about that then? I already tried the tut with no succes.