LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2003, 08:55 PM   #1
Neomaster
Member
 
Registered: May 2003
Location: Digital world
Posts: 113

Rep: Reputation: 15
iptables help


I going to write my own firewall script with iptables.The prob is this.



OUTDEV=ppp0
OUTIP=$( ip addr show $OUTDEV | awk '/inet/{print $2}' )




I am not sure if i should put this when i start my iptables script?I am use dial-up and i want to get a differnt ip number everytime i dial-up.Can anyone help me.
 
Old 05-31-2003, 09:00 PM   #2
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
OUTIP= `/sbin/ifconfig ppp0 |awk '/inet addr/{split($2,x,":"); print x[2]}'`


this should do it
 
Old 05-31-2003, 09:11 PM   #3
Neomaster
Member
 
Registered: May 2003
Location: Digital world
Posts: 113

Original Poster
Rep: Reputation: 15
I part where i lost is.How should i start out my script by useing thar?I been look at other script but i lost.



 
Old 06-01-2003, 12:17 AM   #4
Neomaster
Member
 
Registered: May 2003
Location: Digital world
Posts: 113

Original Poster
Rep: Reputation: 15
Anyone going to help a newbie??
 
Old 06-01-2003, 01:21 PM   #5
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Rep: Reputation: 30
Honestly, this looks like it belongs in the networking forum....
 
  


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
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 06:25 AM
Iptables - Couldn't load target `ACCPET':/lib/iptables/libipt_ACCPET.so: z00t Linux - Security 3 01-26-2004 03:24 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 07:08 AM
iptables book wich one can you pll recomment to be an iptables expert? linuxownt Linux - General 2 06-26-2003 05:38 PM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 08:36 AM


All times are GMT -5. The time now is 04:55 AM.

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