Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I think he wants to know his public ip, which isn't 192.168.0.2. That's just a standard ip config for LANs. Like mine is 192.168.0.2, but I'm connected through a router as well. I don't know how to find out your public ip with any command or utility in linux, however, this site will display your public ip: http://grc.com/x/ne.dll?rh1ck2l2
Allright, I'm thoroughly confused about firewalls and iptables, now. I read a couple of howto's and understand the chains and commands of iptables, but the bash stuff confuses me. How do firewalls determine your IP if your using DHCP? I'm having a hell of a time trying to get firestarter to work, and I'm wondering if this is the reason why I keep getting 'iptables invalid mask specified' errors.
Does the firewall need my actual public IP address or to just set my LAN address?
First off a caveat - I don't really know beans about the specifics of Linux routers and iptables. I use Freesco (www.freesco.org) on a separate box and I'm primarily a Wintel guy. But...
Assuming that you have only one NIC in the box and it's connected to the ADSL modem, then the modem is running NAT (Network Address Translation) which means the Linux box has no idea what the public IP address is, nor does it care. (This also would mean that for anything to reach you Linux box from the Internet, the modem would also need Port Forwarding, in addition to NAT.)
The following is assuming that this is the only box that is using the ADSL modem - If you're running a LAN, things would be a bit different. If you do need to configure a static address on the Linux box for the firewall to work, you should be able to use any address from 192.168.0.3 to 192.168.0.254 with a 24bit Subnet Mask (255.255.255.0) and point to the modem (probably 192.168.0.1) as the Default Gateway. It won't matter that the modem is still running DHCP if there are no other machines connected to it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.