[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux in General  |  Linux Tutorials & How To's  |  Topic: Internet Sharing in Linux / NAT How to
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: 1 2 [3]
  Print  
Author Topic: Internet Sharing in Linux / NAT How to  (Read 40462 times)
0 Members and 1 Guest are viewing this topic.
vlinux1
Linux Learner
***
Offline Offline

Posts: 112


View Profile
« Reply #30 on: March 22, 2005, 02:52:24 PM »

hi  gaurav  & ricky

I did all procedure. but iwant to know i have direct ip on my linux box so what i need to change in that script please tell me.

and one more if we configure nat firewall must be up or not without fire wall can it is possible. because i configure high firewall on default rules but i stopped service /etc/init.d/iptables stop command. please tell me in details
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #31 on: March 23, 2005, 12:33:57 AM »

That script especially works for devices having dynamic ips.. , it will still work for you, just change ppp0 with ethX which is directly connected to internet.

Without firewall it will work..
Actually NAT do packet movement in and out without knowing who is doing it.. so it can be security breach. So i suggested to use firewall.. but with default firewall it will not work..
either u install firestarter and do NAT also using that. ..
or use premade firewall script available easily on internet.
Logged
renato
New Member

Offline Offline

Posts: 2


View Profile
« Reply #32 on: May 21, 2005, 06:15:52 PM »

Hello pals,
Great tutorial, but I'm also concerned about security, so I'd like to know if you can give us some more specific details how to get a firewall installed and configured.
Where can we get your firewall script?
How to install it and configure it so it'll work with this NAT setup?
Have you tested other firewalls such as APF?
http://www.r-fx.org/apf.php

cheers,

renato
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #33 on: May 23, 2005, 06:58:36 AM »

not used that one..
i prefer to made script my self according to my need.
Logged
renato
New Member

Offline Offline

Posts: 2


View Profile
« Reply #34 on: May 23, 2005, 11:42:55 AM »

Hi Ricky,
Where can I find the firewall script you are mentioning a couple of posts above?
I'd like to integrate it with this NAT solution so the system and the LAN are protected.

cheers
Logged
taiwo
New Member

Offline Offline

Posts: 3


View Profile
« Reply #35 on: August 03, 2005, 02:13:17 PM »

.pls does the explanation regarding the NAT also applicable to those using DSL. 'cos i saw ppp in the syntax.[/url]
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #36 on: August 06, 2005, 10:33:41 AM »

when you are connectied to internet then run "ifconfig" and if it shows ur DSL as eth1 or eth0 then change ppp0 to that one and if it shows it to ppp0 then keep it ppp0 !
Logged
anybody1234
Linux Noob !
*
Offline Offline

Posts: 29


View Profile
« Reply #37 on: December 26, 2005, 12:15:01 AM »

Hello

I have requirement in iptables rules as follows

I would need a script for iptables with some configuration option such that
I should be able to make changes in the iptables script for allowing  or disallowing requests made by specifc clients on specifid ports
Suppose My cleints have their default gateway set as my linux box

What I would like is block/disallow requests made by clients on ports
80 while allow the requests made on port 25 ,110

But What I would like to have is some granularity ie
If the requests come from specific IP addresses  I should have the option of allowing them directly thru port 80  

Would anybody please give me step by step process assumimg that I am starting from scratch
I also remember I saw a simliar script in this forum which almost does the same but I can't locate where it is now
Logged
anybody1234
Linux Noob !
*
Offline Offline

Posts: 29


View Profile
« Reply #38 on: December 26, 2005, 06:31:53 AM »

To be more specififc I would use the following commands

Please Let me know If I go wrong anywhere

echo "1" > /proc/sys/net/ipv4/ip_forward

for forwarding packets
and Iptables masquerading rle as
#######################################
iptables -t nat -A POSTROUTING -j MASQUERADE
#####################################
/usr/sbin/iptables-save
##########very imp
iptables-save  > /etc/sysconfig/iptables.rules


Now all teh requests thru my gateway would be allowed
FOr blocking requests made on port 80 by all  would add folloing rule
###******** this rule blocks all requests coming on port 80 ******************
iptables -A FORWARD -i eth0 -p tcp -m tcp --dport 80 -j DROP
#*****************************************************

Now I would like to make an exception for IP addresses 192.168.0.82, 192.168.0.110

I would add rule

iptables -A FORWARD -i eth0 -p tcp -m tcp -s ! 192.168.0.82,192.168.0.110 --dport 80 -j DROP

Now at any stage I felt I ned to remove this rule what I would have done manually is

iptables -D FORWARD -i eth0 -p tcp -m tcp --dport 80 -j DROP
and
iptables -D FORWARD -i eth0 -p tcp -m tcp -s ! 192.168.0.82,192.168.0.110 --dport 80 -j DROP

Now I want a script to do the same thing with start stop  option
I think our experts can give me a simple script to do the same
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #39 on: December 26, 2005, 03:28:50 PM »

Basically this thread is about discussing the NAT in linux. I request you to start a new thread in General networking section about this firewall stuff. The thing you have asked is simple but will take little time sO I think it will be better to discuss it separately to give it full preference. BTW.. you are right. I have already given so many solutions for it that you can find answer already posted in forum so better try to find once more else I m here always to solve the problems which I can solve.
Logged
ruejos08
Linux Noob !
*
Offline Offline

Posts: 6


View Profile
« Reply #40 on: August 02, 2006, 11:05:30 PM »

Will the transparent proxy solve my problem?

My squid is already running(not transparent) but i cannot access my pop3 mail trough my windows client using outlook express.
Heres the error I encountered in my windows client!
Protocol POP3: Port 110 , Secure (SSL): No, Socket Error: 11004, Error Number: 0x800ccc0D
Please help.
Logged
protyne
New Member

Offline Offline

Posts: 1


View Profile
« Reply #41 on: August 24, 2006, 11:35:43 AM »

Hi Ricky,

My ISP provides a DNS server IP. How do I set it on my Linux-NAT so that my DHCP server only need to dish out IP, Subnet Mask and Gateway only with DNS queries being handled by the Linux-NAT?

Thank you!
Logged
dedi
New Member

Offline Offline

Posts: 2


View Profile
« Reply #42 on: December 05, 2006, 09:31:44 PM »

Quote from: "Ricky"
Yes..
by this method ie NAT you can do all you want !

 
particurarly when your ISP set TTL=1  :wink:
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
October 10, 2008, 04:16:33 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 03:18:26 PM]

[October 09, 2008, 05:17:47 PM]

[October 08, 2008, 04:32:08 AM]

[October 07, 2008, 05:16:33 AM]

[October 06, 2008, 03:09:51 AM]

[October 04, 2008, 03:33:03 AM]

[October 03, 2008, 06:21:18 AM]

[October 03, 2008, 05:31:19 AM]

[October 03, 2008, 05:28:14 AM]

[October 03, 2008, 05:27:13 AM]
Members
Total Members: 6099
Latest: totwire
Stats
Total Posts: 8203
Total Topics: 2224
Online Today: 12
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 5
Total: 5
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc