LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-13-2005, 04:31 AM   #1
Stefan Pantiru
LQ Newbie
 
Registered: Apr 2004
Location: Iasi, Romania
Distribution: Gentoo && Fedora
Posts: 9

Rep: Reputation: 0
NAT + public IPS (+ firestarter)


I know there are some other posts like this, but I couldn't really find a solution... so here I am asking again...

Using Fedora Core 3...

I have my linux box (2 nics) sharing my Internet connection to my LAN. I used Firestarter to do that easely.

All ok....

But now, I've got public IP's for every computer in my LAN (round 15 PCs). So what do I have to do to have public ips asigned to my lan PCs?

suppose my public ip is 1.1.1.1

I tried something like this:
Code:
iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 192.168.3.21
and
Code:
iptables -t nat -A POSTROUTING -s 192.168.3.21 -j SNAT --to-source 1.1.1.1
to asign the public ip 82.77.230.225 to my local IP 192.168.3.21, but it's not really working... I cannot ping 1.1.1.1 from Internet... and a site like "what's my ip" will only see my router's ip not the nat-ed ones...

i believe firestarter has nothing to do with this...

any ideas how this job SHOULD be done?

I tried adding this:

thanks
Code:
route add -net 1.1.1.0 netmask 255.255.255.224 dev eth1
eth1 being the nic connected to the ISP
still no succes...

Last edited by Stefan Pantiru; 05-13-2005 at 07:18 AM.
 
Old 05-14-2005, 01:24 AM   #2
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Rep: Reputation: 15
hi Stefan Pantiru,
i could not get what exactly u want to do ???
suppose u have 15 internal PCs with public IPs, u need not configure NAT bcoz all r public IPs. simple configure each host with its ip & SPECIFY the route & DNS on each host. thats it. if i am n't wrong.
 
Old 05-17-2005, 05:43 AM   #3
Stefan Pantiru
LQ Newbie
 
Registered: Apr 2004
Location: Iasi, Romania
Distribution: Gentoo && Fedora
Posts: 9

Original Poster
Rep: Reputation: 0
I tried that... i couldn't make it work, maybe the fact that there was the same netmask on my both nics then... i don't know...
Anyway, I abandoned the idea... it would have bine nice to have a clear solution about how could this sort of "mapping" could be done, though...

thx for the answer, jkmartha!

Last edited by Stefan Pantiru; 05-17-2005 at 05:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux as a router but for multiple public IPs gnirtS Linux - Networking 8 03-07-2005 03:08 PM
Router with multiple public IPs Neodymium Linux - Newbie 1 04-13-2004 06:39 PM
Firewall - filter for public IPs caremaker Linux - Networking 6 01-09-2004 12:17 PM
Public IPs behind router Buzer Linux - Networking 2 09-20-2003 01:36 PM
Sharing two public IPs. Unseen Linux - Networking 8 03-20-2003 01:17 PM

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

All times are GMT -5. The time now is 09:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration