Visit The New, Modern Unix Linux Community


Can not access Linux server over the Internet


 
Thread Tools Search this Thread
Special Forums IP Networking Can not access Linux server over the Internet
# 1  
Can not access Linux server over the Internet

hi i have linux server connected to internet through a switch/router. i have opened a port on the router and i am able to connect to the server if iptables is off. but when it is on i cant.

i want to create a rule in iptables so that it accepts packets coming from a particular datacard. it should reject any other request.

the port on the server is 22.

thanx in advance....
# 2  
Please post network information and your iptables configuration.

Please post the output of:

iptables -L
# 3  
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  192.168.1.3          anywhere            tcp dpt:ssh state NEW
ACCEPT     tcp  --  192.168.1.8          anywhere            tcp dpt:ssh state NEW
ACCEPT     tcp  --  192.168.1.6          anywhere            tcp dpt:ssh state NEW
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
Chain FORWARD (policy DROP)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

# 4  
I suggest you start by accepting the (authorized) IP address of the source and rejecting all other IP addresses.

When you get that working, then you can refine to add the port.
# 5  
but the ips generated from the datacards are changing they are not static.
how to allow net connection from only one datacard!!!!!

---------- Post updated at 03:50 PM ---------- Previous update was at 01:47 PM ----------

is there any way i can check the esn bits of datacard in ip tables ??
# 6  
Only the last octet of the IP address is dynamic. Work with the first three octets first. Get a minimal baseline going and keep it simple.
# 7  
thanx for helping but can u help with an example.
day i want to open port for ip say 112.140.123.234
say last 2 octets are dynamic then wat would be the command in unix?

Last edited by u.n.i.x; 02-08-2010 at 01:50 AM..

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #537
Difficulty: Medium
An enumerated data type allows a user to define a list of keywords associated with integers.
True or False?

10 More Discussions You Might Find Interesting

1. Proxy Server

How to use Squid on Linux to control certain IP to access Web Server and certain IP cannot access?

Dear all experts here, :) I would like to install a proxy server on Linux server to perform solely to control the access of Web server. In this case, some of my vendor asked me to try Squid and I have installed it onto my Linux server. I would like know how can I set the configuration to... (1 Reply)
Discussion started by: kwliew999
1 Replies

2. UNIX for Dummies Questions & Answers

Linux/UNIX Server won't connect to Internet

I know nothing about Linux/Unix. The fact that it is Linux/Unix is what someone told me the server is. It has been set up with the work stations in my home and would connect to the internet (DSL) and work with the other stations. We now have an actual office that does not have DSL, but rather has... (2 Replies)
Discussion started by: BgDunbar
2 Replies

3. Red Hat

Access Linux server from windows

I can access the linux server in my company from my desktop windows explorer. I guess samba is working. Please see the images. http://imageshack.us/a/img854/7106/9yvl.png I have a few questions. I don't have the linux account and I have never accessed it from shell. Is my windows login... (1 Reply)
Discussion started by: zhshqzyc
1 Replies

4. Red Hat

Unable to access NFS share on Solaris Server from Linux client

Hi, I am trying to access a NFS shared directory on Solaris 10 Server from a client which is RHEL 4 Server. On the NFS Server, in /etc/dfs/, I added following line to dfstab file. share -F nfs -o rw /var/share & then ran the following svcadm -v enable -r... (3 Replies)
Discussion started by: SunilB2011
3 Replies

5. Solaris

Can't access NFS Share on Solaris Server from a Linux Client

Hi, I am trying to access a NFS shared directory on Solaris 10 Server from a client which is RHEL 4 Server. On the NFS Server, in /etc/dfs/, I added following line to dfstab file. & then ran the following On the client machine, while running the mount command, I am... (0 Replies)
Discussion started by: SunilB2011
0 Replies

6. IP Networking

Does my provider limit my internet access or somesites access?

Hi Good Day, i would like to ask for further info about my problems experiencing this evening. Im a PPP0 connection in the internet using 3G located in asia pacific region.i had this problem this evening in my INTERNET connections that there are some sites i can't open example ( Gizmodo.com,... (2 Replies)
Discussion started by: jao_madn
2 Replies

7. IP Networking

Access Unix server over the Internet

:(:confused: i am going to ask a silly question. is it possible to setup a unix server at home. once i have setup successfully, can i provide access to that server via internet. i do not have any commercial intent, behind this. (3 Replies)
Discussion started by: sudhiroracle
3 Replies

8. UNIX for Advanced & Expert Users

Access to particular IP's from the solaris/LINUX server

Hi All, I have a scenario here where in I need to allow a user from the server(Solaris or LINUX) to be able to ssh to a particular set of IP's. Eg:user1 should be able to access IP's 10.26.32.2,10.26.32.7,10.26.32.9 user2 should be able to access IP's 10.1.1.2,10.1.1.4(just an example) ... (2 Replies)
Discussion started by: pk123
2 Replies

9. UNIX for Dummies Questions & Answers

TomCat access in an Remote Linux Server

Hi all, I Installed Tomcat in an remote linux server (/usr/tomcat)and start service, using ./startup.sh (and tried with ./catalina.sh too). //----------------------------------------------------------------// # ./startup.sh Using CATALINA_BASE: /usr/tomcat/apache-tomcat-6.0.16/ Using... (1 Reply)
Discussion started by: gothama
1 Replies

10. UNIX for Dummies Questions & Answers

Linux for an internet server to an ISP

I just moved away from a T3 line back to a dial up I just wanted to know would a P200 with 64meg and a 4 gig hard drive be ok for a linux server for an additional 3 pcs all running win98. I will be dialing into an isp using a 56k v90 modem. Any support or help will be great. (3 Replies)
Discussion started by: izrailov
3 Replies

Featured Tech Videos