Networking Forums

Networking Forums > Computer Networking > Linux Networking > ICS not working

Reply
Thread Tools Display Modes

ICS not working

 
 
rihad
Guest
Posts: n/a

 
      08-03-2003, 10:13 AM
How to enable Internet connection sharing? I've two Linux boxes
connected with the "null hub" thing, one of which acts as a gateway
and is used to dial out to an ISP thru ppp0. Here's what I'm trying to
do:

on the gateway:
ifconfig eth0 192.168.0.9
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
sysctl -w net.ipv4.ip_forward=1

on the second machine:
ifconfig eth0 192.168.0.10
route add default gw 192.168.0.9

After this pinging an external IP address does not work from the
second machine. There's one thing: my ISP gives me a static IP
address.

TIA

 
Reply With Quote
 
 
 
 
Ian Northeast
Guest
Posts: n/a

 
      08-03-2003, 11:38 AM
rihad wrote:
>
> How to enable Internet connection sharing? I've two Linux boxes
> connected with the "null hub" thing, one of which acts as a gateway
> and is used to dial out to an ISP thru ppp0. Here's what I'm trying to
> do:
>
> on the gateway:
> ifconfig eth0 192.168.0.9
> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> iptables -A FORWARD -i eth0 -j ACCEPT
> sysctl -w net.ipv4.ip_forward=1


add

iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED
-j ACCEPT

(all one line). This allows responses to the masqueraded packets back
in.

Regards, Ian
 
Reply With Quote
 
rihad
Guest
Posts: n/a

 
      08-03-2003, 12:28 PM
On Sun, 03 Aug 2003 12:38:38 +0100, Ian Northeast
<(E-Mail Removed)> wrote:

>
>iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED
>-j ACCEPT
>
>(all one line). This allows responses to the masqueraded packets back
>in.
>


Thanks a lot!! Works like silk.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
previously working wireless connection no longer working zapspan Wireless Networks 5 01-17-2010 09:11 PM
Ad hoc connection working, but ICS not working. Any help? Brian O Wireless Networks 6 09-29-2007 03:58 PM
wifi not working on new hp, or not working after live update Dragonx Wireless Networks 1 10-01-2005 11:17 PM
(Wireless) LAN access working. WAN (remote) web access not working! Godffrey Linux Networking 1 01-14-2005 02:20 AM
Kernel-nfs working, plain nfs not working. alw Linux Networking 0 09-23-2003 11:14 PM



1 2 3 4 5 6 7 8 9 10 11