View previous topic :: View next topic |
Author |
Message |
furkan Guru
Joined: 11 Dec 2003 Posts: 520 Location: Montreal CA
|
Posted: Thu May 20, 2004 6:28 pm Post subject: gateway.... |
|
|
hi all....i have one question.....
i have two computer i give name first computer names HostComputer and second computer names ClientComputer and in HostComputer i have one connection dialupi would like to know how can i use internet connection of HostComputer i mean gateway how can i do it ? |
|
Back to top |
|
|
furkan Guru
Joined: 11 Dec 2003 Posts: 520 Location: Montreal CA
|
Posted: Thu May 20, 2004 6:29 pm Post subject: |
|
|
but without program |
|
Back to top |
|
|
furkan Guru
Joined: 11 Dec 2003 Posts: 520 Location: Montreal CA
|
Posted: Fri May 21, 2004 2:31 pm Post subject: |
|
|
ok i know how it is with iptables and for file transfer is scp (if i remember ) but in livecd how can i do it i mean to sharing internet ? |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Fri May 21, 2004 3:21 pm Post subject: |
|
|
If HostComputer has iptables installed, you need to run these commands (replace eth0 with the interface HostComputer uses to connect to the internet):
/bin/echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
You also need to let www traffic through:
/sbin/iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
/sbin/iptables -A FORWARD -p tcp --dport 443 -j ACCEPT
ClientComputer only needs to have HostComputer as the default gateway.
See the ipmasquerading howto for more info.
http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html
You should also create some stronger firewall rules once you get it running |
|
Back to top |
|
|
furkan Guru
Joined: 11 Dec 2003 Posts: 520 Location: Montreal CA
|
Posted: Fri May 21, 2004 8:38 pm Post subject: |
|
|
thanks for help ( i have thinked nobody will answer ) |
|
Back to top |
|
|
|