| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| FGHC Junior Member
 
 
 Joined: 06 May 2008
 Posts: 8
 Location: Portugal
 
 | 
			
				|  Posted: Tue May 06, 2008 8:11 pm    Post subject: add script to iptables |   |  
				| 
 |  
				| Hi, Im using SMS for a few days, and today i want to create a Call of Duty 2 dedicated server. For that i need to add a script to my iptables and i dont know hot to do it. Can someone help me.
 
 I need to add the following script to my iptables:
 
 
  	  | Code: |  	  | #! /bin/bash $MyIP = “192.168.2.100”
 /sbin/iptables -A INPUT -p udp -d $MyIP --dport 28960 -m state --state NEW -j
 ACCEPT
 | 
 
 Cheers
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Tue May 06, 2008 9:18 pm    Post subject: |   |  
				| 
 |  
				| hello. You can use Easy Firewall Generator for IPTables (EFG) for having a complete iptables rc.firewall script and add your command to it, save it as rc.firewall and place it at /etc/rc.d/ and make it executable with 'chmod +x /etc/rc.d/rc.firewall'
 Every time the system boots rc.firewall will executed.
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		|  |