Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables NAT for sharing net

Reply
Thread Tools Display Modes

iptables NAT for sharing net

 
 
balavignesh
Guest
Posts: n/a

 
      05-14-2006, 02:41 PM
Hello friends!


i have two ethernet card with my pc.

one is connected with ethernet modem for internet. (eth0 -a.b.c.d)

another one is connected with laptop.(eth1 w.x.y.z)

my isp provider gave dns address and my ethernet modem set as
192.168.1.2 for connectivity to system and it will get the dynamic ip
address from the isp.

i want share the net with my laptop.

what is the iptables NAT command for transfer the data among eth0 and
eth1?
what is the command for ip masqureading?

regards
bala

 
Reply With Quote
 
 
 
 
noEMA
Guest
Posts: n/a

 
      05-14-2006, 03:05 PM
On Sun, 14 May 2006 07:41:54 -0700, balavignesh wrote:

> Hello friends!
>
>
> i have two ethernet card with my pc.
>
> one is connected with ethernet modem for internet. (eth0 -a.b.c.d)
>
> another one is connected with laptop.(eth1 w.x.y.z)
>
> my isp provider gave dns address and my ethernet modem set as 192.168.1.2
> for connectivity to system and it will get the dynamic ip address from the
> isp.
>
> i want share the net with my laptop.
>
> what is the iptables NAT command for transfer the data among eth0 and
> eth1?
> what is the command for ip masqureading?
>
> regards
> bala


Hi.

I propose a look at a program called FireStarter.

It is a program designed to ease the building of firewalling rules.
It also have a windows where you can see the hits on your firewall.

Site :

http://www.fs-security.com/

Hope it help

 
Reply With Quote
 
Slacknix
Guest
Posts: n/a

 
      05-14-2006, 03:56 PM
You could just build a bridge that connects you laptop to the
gateway(192.168.1.2) trough your PC. That is if your laptop and PC have
192.168.1.xxx ip adresses.

BASH# ifconfig eth0 0.0.0.0 up
BASH# ifconfig eth1 0.0.0.0 up
BASH# brctl add br0
BASH# brctl addif br0 eth0 eth1
BASH# ifconfig br0 192.168.1.yyy

Replace yyy with the ip that your PC should have.

This works on Slackware hope it works for you

 
Reply With Quote
 
ArameFarpado
Guest
Posts: n/a

 
      05-14-2006, 05:05 PM
balavignesh wrote:

> Hello friends!
>
>
> i have two ethernet card with my pc.
>
> one is connected with ethernet modem for internet. (eth0 -a.b.c.d)
>
> another one is connected with laptop.(eth1 w.x.y.z)
>
> my isp provider gave dns address and my ethernet modem set as
> 192.168.1.2 for connectivity to system and it will get the dynamic ip
> address from the isp.
>
> i want share the net with my laptop.
>
> what is the iptables NAT command for transfer the data among eth0 and
> eth1?
> what is the command for ip masqureading?
>
> regards
> bala



I do that with a program named "guidedog".

Regards
ArameFarpado
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      05-14-2006, 09:33 PM
On 14 May 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, balavignesh wrote:

>what is the iptables NAT command for transfer the data among eth0 and
>eth1?
>what is the command for ip masqureading?


Hmmm... no information about what distribution - no release - not much
of anything, really.

http://ibiblio.org/pub/linux/docs/HOWTO/
http://en.tldp.org/HOWTO/HOWTO-INDEX/howtos.html

270963 Apr 12 16:13 HOWTO-INDEX
96639 Apr 12 16:13 INDEX
85507 Aug 20 2001 Firewall-HOWTO
708351 Nov 14 09:34 IP-Masquerade-HOWTO
17605 Jul 21 2004 Masquerading-Simple-HOWTO
45604 Apr 18 12:20 Networking-Overview-HOWTO
278012 Jul 23 2002 Security-Quickstart-HOWTO
71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO

http://tldp.org/guides.html

Introduction to Linux - A Hands on Guide
Linux System Administration Made Easy
Securing & Optimizing Linux: The Ultimate Solution
The Linux Network Administrator's Guide, Second Edition
The Linux System Administrators' Guide

and for your future postings:

http://www.catb.org/~esr/faqs/smart-questions.html
http://groups.google.com/support/bin...y?answer=14213

Old guy
 
Reply With Quote
 
balavignesh
Guest
Posts: n/a

 
      05-15-2006, 03:22 AM
Hello friends!

Thank you for reply.......
I will try ur options and then reply the results.

Mr.moe trin, thank u for ur guide lines.
I will change my type of post.

regards

bala

 
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
2 desktop connected and sharing, 1 laptop connect but not sharing dtappen@rogers.com Wireless Networks 0 09-02-2005 01:58 PM
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
File Sharing Intermittent but Pings fine and iTunes Sharing works Chris Clark Wireless Networks 1 12-05-2004 12:07 PM
sharing internet with iptables Cothbw Linux Networking 4 08-01-2004 09:10 AM
iptables "can't initialize iptables table `filter'" pete Linux Networking 1 10-10-2003 03:44 AM



1 2 3 4 5 6 7 8 9 10 11